diff options
author | Eduardo Julian | 2015-08-05 20:21:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-08-05 20:21:04 -0400 |
commit | 24cc40e76f83188688ad43c499a44508e1aa5d60 (patch) | |
tree | 77ec313964ebcb70f48998a392b1176959f5413c /src/lux/analyser/host.clj | |
parent | f855c20a7af7428b638e4c2a3c4c654bd01576dc (diff) |
- Local vars can now longer have prefixed symbols.
Diffstat (limited to '')
-rw-r--r-- | src/lux/analyser/host.clj | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lux/analyser/host.clj b/src/lux/analyser/host.clj index 663c650e7..d03d0e65c 100644 --- a/src/lux/analyser/host.clj +++ b/src/lux/analyser/host.clj @@ -299,10 +299,10 @@ ["lux;Nil" _]]]]]]]]]]]]]]]] (|do [=method-inputs (&/map% (fn [minput] (matchv ::M/objects [minput] - [["lux;Meta" [_ ["lux;FormS" ["lux;Cons" [["lux;Meta" [_ ["lux;SymbolS" ?input-name]]] + [["lux;Meta" [_ ["lux;FormS" ["lux;Cons" [["lux;Meta" [_ ["lux;SymbolS" ["" ?input-name]]]] ["lux;Cons" [["lux;Meta" [_ ["lux;TextS" ?input-type]]] ["lux;Nil" _]]]]]]]]] - (return (&/T (&/ident->text ?input-name) ?input-type)) + (return (&/T ?input-name ?input-type)) [_] (fail "[Analyser Error] Wrong syntax for method input."))) @@ -358,7 +358,7 @@ (|do [:let [[?catches ?finally] ?catches+?finally] =body (&&/analyse-1 analyse exo-type ?body) =catches (&/map% (fn [[?ex-class ?ex-arg ?catch-body]] - (|do [=catch-body (&&env/with-local (str ";" ?ex-arg) (&/V "lux;DataT" ?ex-class) + (|do [=catch-body (&&env/with-local ?ex-arg (&/V "lux;DataT" ?ex-class) (&&/analyse-1 analyse exo-type ?catch-body)) idx &&env/next-local-idx] (return (&/T ?ex-class idx =catch-body)))) @@ -434,9 +434,8 @@ ) (defn analyse-jvm-program [analyse compile-token ?args ?body] - (|let [[_module _name] ?args] - (|do [=body (&/with-scope "" - (&&env/with-local (str _module ";" _name) (&/V "lux;AppT" (&/T &type/List &type/Text)) - (&&/analyse-1 analyse (&/V "lux;AppT" (&/T &type/IO &type/Unit)) ?body))) - _ (compile-token (&/V "jvm-program" =body))] - (return (&/|list))))) + (|do [=body (&/with-scope "" + (&&env/with-local ?args (&/V "lux;AppT" (&/T &type/List &type/Text)) + (&&/analyse-1 analyse (&/V "lux;AppT" (&/T &type/IO &type/Unit)) ?body))) + _ (compile-token (&/V "jvm-program" =body))] + (return (&/|list)))) |