diff options
Diffstat (limited to 'new-luxc/test/test/luxc/lang/analysis/reference.lux')
-rw-r--r-- | new-luxc/test/test/luxc/lang/analysis/reference.lux | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/reference.lux b/new-luxc/test/test/luxc/lang/analysis/reference.lux index 14079c6b8..45e1eb0e8 100644 --- a/new-luxc/test/test/luxc/lang/analysis/reference.lux +++ b/new-luxc/test/test/luxc/lang/analysis/reference.lux @@ -1,4 +1,4 @@ -(;module: +(.module: lux (lux [io] (control [monad #+ do] @@ -8,43 +8,43 @@ [macro #+ Monad<Meta>] (lang [type "type/" Eq<Type>]) test) - (luxc (lang ["&;" scope] - ["&;" module] + (luxc (lang ["&." scope] + ["&." module] ["~" analysis] - (analysis [";A" expression] + (analysis [".A" expression] ["@" reference] - ["@;" common]))) - (.. common) + ["@." common]))) + (// common) (test/luxc common)) (context: "References" (<| (times +100) (do @ [[ref-type _] gen-primitive - module-name (r;text +5) - scope-name (r;text +5) - var-name (r;text +5)] + module-name (r.text +5) + scope-name (r.text +5) + var-name (r.text +5)] ($_ seq (test "Can analyse variable." - (|> (&scope;with-scope scope-name - (&scope;with-local [var-name ref-type] - (@common;with-unknown-type - (@;analyse-reference ["" var-name])))) - (macro;run (init-compiler [])) - (case> (^ (#e;Success [_type (^code ((~ [_ (#;Int var)])))])) + (|> (&scope.with-scope scope-name + (&scope.with-local [var-name ref-type] + (@common.with-unknown-type + (@.analyse-reference ["" var-name])))) + (macro.run (init-compiler [])) + (case> (^ (#e.Success [_type (^code ((~ [_ (#.Int var)])))])) (type/= ref-type _type) _ false))) (test "Can analyse definition." (|> (do Monad<Meta> - [_ (&module;create +0 module-name) - _ (&module;define [module-name var-name] + [_ (&module.create +0 module-name) + _ (&module.define [module-name var-name] [ref-type (' {}) (:! Void [])])] - (@common;with-unknown-type - (@;analyse-reference [module-name var-name]))) - (macro;run (init-compiler [])) - (case> (#e;Success [_type [_ (#;Symbol def-name)]]) + (@common.with-unknown-type + (@.analyse-reference [module-name var-name]))) + (macro.run (init-compiler [])) + (case> (#e.Success [_type [_ (#.Symbol def-name)]]) (type/= ref-type _type) _ |