aboutsummaryrefslogtreecommitdiff
path: root/source/lux/host/jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-08-04 19:40:58 -0400
committerEduardo Julian2015-08-04 19:40:58 -0400
commita8ac885a008f519816d747eca0f894ec9794e938 (patch)
tree9199038b98adfcab2b6ec0b3796f4e06757f38da /source/lux/host/jvm.lux
parent8a78830404234dc6e766ed6b653905bd7c89fac2 (diff)
- Renamed the Syntax type to AST.
- Created the lux/meta/ast module.
Diffstat (limited to 'source/lux/host/jvm.lux')
-rw-r--r--source/lux/host/jvm.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/lux/host/jvm.lux b/source/lux/host/jvm.lux
index 2c90b1ba3..f136bd73b 100644
--- a/source/lux/host/jvm.lux
+++ b/source/lux/host/jvm.lux
@@ -14,20 +14,20 @@
(text #as text)
(number (int #open ("i" Int/Eq))))
(meta lux
- macro
+ ast
syntax)))
## [Utils]
## Parsers
(def finally^
- (Parser Syntax)
+ (Parser AST)
(form^ (do Parser/Monad
[_ (symbol?^ ["" "finally"])
expr id^]
(M;wrap expr))))
(def catch^
- (Parser (, Text Ident Syntax))
+ (Parser (, Text Ident AST))
(form^ (do Parser/Monad
[_ (symbol?^ ["" "catch"])
ex-class local-symbol^
@@ -60,7 +60,7 @@
(M;wrap [arg-name arg-class]))))
(def method-def^
- (Parser (, (List Text) Text (List (, Text Text)) Text Syntax))
+ (Parser (, (List Text) Text (List (, Text Text)) Text AST))
(form^ (do Parser/Monad
[modifiers (*^ local-tag^)
name local-symbol^
@@ -70,7 +70,7 @@
(M;wrap [modifiers name inputs output body]))))
(def method-call^
- (Parser (, Text (List Text) (List Syntax)))
+ (Parser (, Text (List Text) (List AST)))
(form^ (do Parser/Monad
[method local-symbol^
arity-classes (tuple^ (*^ local-symbol^))
@@ -89,7 +89,7 @@
(defsyntax #export (try body [catches (*^ catch^)] [finally (?^ finally^)])
(emit (list (` (_jvm_try (~ body)
- (~@ (:: List/Monoid (m;++ (map (: (-> (, Text Ident Syntax) Syntax)
+ (~@ (:: List/Monoid (m;++ (map (: (-> (, Text Ident AST) AST)
(lambda [catch]
(let [[class ex body] catch]
(` (_jvm_catch (~ (text$ class)) (~ (symbol$ ex)) (~ body))))))
@@ -102,7 +102,7 @@
(list (` (_jvm_finally (~ finally)))))))))))))
(defsyntax #export (definterface [name local-symbol^] [supers (tuple^ (*^ local-symbol^))] [members (*^ method-decl^)])
- (let [members' (map (: (-> (, (List Text) Text (List Text) Text) Syntax)
+ (let [members' (map (: (-> (, (List Text) Text (List Text) Text) AST)
(lambda [member]
(let [[modifiers name inputs output] member]
(` ((~ (text$ name)) [(~@ (map text$ inputs))] (~ (text$ output)) [(~@ (map text$ modifiers))])))))
@@ -115,18 +115,18 @@
[methods (*^ method-def^)])
(do Lux/Monad
[current-module get-module-name
- #let [fields' (map (: (-> (, (List Text) Text Text) Syntax)
+ #let [fields' (map (: (-> (, (List Text) Text Text) AST)
(lambda [field]
(let [[modifiers name class] field]
(` ((~ (text$ name))
(~ (text$ class))
[(~@ (map text$ modifiers))])))))
fields)
- methods' (map (: (-> (, (List Text) Text (List (, Text Text)) Text Syntax) Syntax)
+ methods' (map (: (-> (, (List Text) Text (List (, Text Text)) Text AST) AST)
(lambda [methods]
(let [[modifiers name inputs output body] methods]
(` ((~ (text$ name))
- [(~@ (map (: (-> (, Text Text) Syntax)
+ [(~@ (map (: (-> (, Text Text) AST)
(lambda [in]
(let [[left right] in]
(form$ (list (symbol$ ["" left])