aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool/compiler/meta/context.lux
blob: 17258fa87ac2ae5371eca3dd3c83a7058e922a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(.require
 [library
  [lux (.except)
   ["@" target (.only Target)]
   [world
    [file (.only Path)]]]])

(type: .public Extension
  Text)

(type: .public Context
  (Record
   [#host Target
    #host_module_extension Extension
    #target Path
    #artifact_extension Extension]))

(with_template [<name> <host> <host_module_extension> <artifact_extension>]
  [(def .public (<name> target)
     (-> Path Context)
     [#host <host>
      #host_module_extension <host_module_extension>
      #target target
      #artifact_extension <artifact_extension>])]

  [jvm @.jvm ".jvm" ".class"]
  [js @.js ".js" ".js"]
  [lua @.lua ".lua" ".lua"]
  [python @.python ".py" ".py"]
  [ruby @.ruby ".rb" ".rb"]
  )