diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/generator/case.lux | 6 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/function.lux | 12 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/primitive.lux | 6 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/procedure/common.jvm.lux | 42 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/procedure/host.jvm.lux | 112 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/reference.lux | 6 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/generator/structure.lux | 6 |
7 files changed, 95 insertions, 95 deletions
diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux index ff0e017aa..cfbe31de8 100644 --- a/new-luxc/test/test/luxc/generator/case.lux +++ b/new-luxc/test/test/luxc/generator/case.lux @@ -14,7 +14,7 @@ [analyser] [synthesizer] (generator ["@" case] - [";G" expr] + [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -73,7 +73,7 @@ (test "Can generate pattern-matching." (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate-case exprG;generate + sampleI (@;generate-case expressionG;generate valueS (` ("lux case alt" ("lux case seq" (~ pathS) @@ -90,7 +90,7 @@ (test "Can bind values." (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate-case exprG;generate + sampleI (@;generate-case expressionG;generate (code;nat to-bind) (` ("lux case seq" ("lux case bind" +0) ("lux case exec" (0)))))] diff --git a/new-luxc/test/test/luxc/generator/function.lux b/new-luxc/test/test/luxc/generator/function.lux index 1f922706c..5620996b5 100644 --- a/new-luxc/test/test/luxc/generator/function.lux +++ b/new-luxc/test/test/luxc/generator/function.lux @@ -16,7 +16,7 @@ (luxc (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@;" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -51,7 +51,7 @@ (test "Can read arguments." (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" (~ functionS) (~@ argsS))))] + sampleI (expressionG;generate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -66,9 +66,9 @@ preS (list;take partial-arity argsS) postS (list;drop partial-arity argsS)] runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" - ("lux call" (~ functionS) (~@ preS)) - (~@ postS))))] + sampleI (expressionG;generate (` ("lux call" + ("lux call" (~ functionS) (~@ preS)) + (~@ postS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -90,7 +90,7 @@ ("lux function" (~ (code;nat sub-arity)) [(~@ (list/map code;int env))] ((~ (code;int arg-var))))))] runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" (~ functionS) (~@ argsS))))] + sampleI (expressionG;generate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) diff --git a/new-luxc/test/test/luxc/generator/primitive.lux b/new-luxc/test/test/luxc/generator/primitive.lux index 37f87829b..84f47f146 100644 --- a/new-luxc/test/test/luxc/generator/primitive.lux +++ b/new-luxc/test/test/luxc/generator/primitive.lux @@ -15,7 +15,7 @@ (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" runtime] ["@;" eval] ["@;" common])) @@ -34,7 +34,7 @@ [<tests> (do-template [<desc> <type> <synthesis> <sample> <test>] [(test (format "Can generate " <desc> ".") (|> (do meta;Monad<Meta> - [sampleI (@;generate (<synthesis> <sample>))] + [sampleI (expressionG;generate (<synthesis> <sample>))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -52,7 +52,7 @@ ($_ seq (test "Can generate unit." (|> (do meta;Monad<Meta> - [sampleI (@;generate (' []))] + [sampleI (expressionG;generate (' []))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) diff --git a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux index 7e36575d8..79829672d 100644 --- a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux @@ -19,7 +19,7 @@ (luxc (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -33,8 +33,8 @@ (with-expansions [<binary> (do-template [<name> <reference>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name> (~ (code;nat subject)) - (~ (code;nat param)))))] + [sampleI (expressionG;generate (` (<name> (~ (code;nat subject)) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -52,7 +52,7 @@ ($_ seq (test "bit count" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("bit count" (~ (code;nat subject)))))] + [sampleI (expressionG;generate (` ("bit count" (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -64,9 +64,9 @@ <binary> (test "bit shift-right" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("bit shift-right" - (~ (code;int (nat-to-int subject))) - (~ (code;nat param)))))] + [sampleI (expressionG;generate (` ("bit shift-right" + (~ (code;int (nat-to-int subject))) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -86,7 +86,7 @@ (~~ (do-template [<name> <reference>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name>)))] + [sampleI (expressionG;generate (` (<name>)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -101,7 +101,7 @@ (~~ (do-template [<name> <type> <prepare> <comp>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name> (~ (code;nat subject)))))] + [sampleI (expressionG;generate (` (<name> (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -117,7 +117,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;nat subject)) (~ (code;nat param)))))] + sampleI (expressionG;generate (` (<name> (~ (code;nat subject)) (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -144,7 +144,7 @@ (with-expansions [<nullary> (do-template [<name> <reference>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name>)))] + [sampleI (expressionG;generate (` (<name>)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -159,7 +159,7 @@ <unary> (do-template [<name> <type> <prepare> <comp>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name> (~ (code;int subject)))))] + [sampleI (expressionG;generate (` (<name> (~ (code;int subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -175,7 +175,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;int subject)) (~ (code;int param)))))] + sampleI (expressionG;generate (` (<name> (~ (code;int subject)) (~ (code;int param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -207,7 +207,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;frac subject)) (~ (code;frac param)))))] + sampleI (expressionG;generate (` (<name> (~ (code;frac subject)) (~ (code;frac param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -236,7 +236,7 @@ (with-expansions [<nullary> (do-template [<name> <test>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name>)))] + [sampleI (expressionG;generate (` (<name>)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -256,7 +256,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;frac subject)))))] + sampleI (expressionG;generate (` (<name> (~ (code;frac subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -274,7 +274,7 @@ (test "frac encode|decode" (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] + sampleI (expressionG;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (^multi (#e;Success valueG) @@ -302,7 +302,7 @@ (~~ (do-template [<name> <reference>] [(test <name> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<name>)))] + [sampleI (expressionG;generate (` (<name>)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -318,7 +318,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;deg subject)))))] + sampleI (expressionG;generate (` (<name> (~ (code;deg subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -333,7 +333,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;deg subject)) (~ (code;deg param)))))] + sampleI (expressionG;generate (` (<name> (~ (code;deg subject)) (~ (code;deg param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -354,7 +354,7 @@ [(test <name> (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` (<name> (~ (code;deg subject)) (~ (code;nat special)))))] + sampleI (expressionG;generate (` (<name> (~ (code;deg subject)) (~ (code;nat special)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) diff --git a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux index 153f276cc..8db98ed37 100644 --- a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux @@ -20,7 +20,7 @@ (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -34,7 +34,7 @@ (with-expansions [<2step> (do-template [<step1> <step2> <tag> <sample> <cast> <test>] [(test (format <step1> " / " <step2>) (|> (do meta;Monad<Meta> - [sampleI (@;generate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))] + [sampleI (expressionG;generate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -65,7 +65,7 @@ (~~ (do-template [<step1> <step2> <step3> <tag> <sample> <cast> <test>] [(test (format <step1> " / " <step2> " / " <step3>) (|> (do meta;Monad<Meta> - [sampleI (@;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))] + [sampleI (expressionG;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -91,7 +91,7 @@ (~~ (do-template [<step1> <step2> <step3> <step4> <tag> <sample> <cast> <test>] [(test (format <step1> " / " <step2> " / " <step3>) (|> (do meta;Monad<Meta> - [sampleI (@;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))] + [sampleI (expressionG;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -129,9 +129,9 @@ (with-expansions [<tests> (do-template [<procedure> <reference>] [(test <procedure> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<post> ((~ (code;text <procedure>)) - (<pre> (~ (<tag> subject))) - (<pre> (~ (<tag> param)))))))] + [sampleI (expressionG;generate (` (<post> ((~ (code;text <procedure>)) + (<pre> (~ (<tag> subject))) + (<pre> (~ (<tag> param)))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -167,9 +167,9 @@ (~~ (do-template [<procedure> <reference>] [(test <procedure> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<post> ((~ (code;text <procedure>)) - (<convert> (~ (code;nat subject))) - (<convert> (~ (code;nat param)))))))] + [sampleI (expressionG;generate (` (<post> ((~ (code;text <procedure>)) + (<convert> (~ (code;nat subject))) + (<convert> (~ (code;nat param)))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -200,9 +200,9 @@ (~~ (do-template [<procedure> <reference> <type> <test> <pre-subject> <pre>] [(test <procedure> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` (<post> ((~ (code;text <procedure>)) - (<convert> (~ (<pre> subject))) - ("jvm convert long-to-int" (~ (code;nat shift)))))))] + [sampleI (expressionG;generate (` (<post> ((~ (code;text <procedure>)) + (<convert> (~ (<pre> subject))) + ("jvm convert long-to-int" (~ (code;nat shift)))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -231,9 +231,9 @@ (with-expansions [<tests> (do-template [<procedure> <reference>] [(test <procedure> (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ((~ (code;text <procedure>)) - (<pre> (~ (<tag> subject))) - (<pre> (~ (<tag> param))))))] + [sampleI (expressionG;generate (` ((~ (code;text <procedure>)) + (<pre> (~ (<tag> subject))) + (<pre> (~ (<tag> param))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -285,12 +285,12 @@ (with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>] [(test <class> (|> (do meta;Monad<Meta> - [sampleI (@;generate (|> (jvm//array//new +0 <class> size) - (jvm//array//write <class> idx <input>) - (jvm//array//read <class> idx) - (~) - <post> - (`)))] + [sampleI (expressionG;generate (|> (jvm//array//new +0 <class> size) + (jvm//array//write <class> idx <input>) + (jvm//array//read <class> idx) + (~) + <post> + (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputZ) @@ -334,12 +334,12 @@ (with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>] [(test <class> (|> (do meta;Monad<Meta> - [sampleI (@;generate (|> (jvm//array//new +0 <class> size) - (jvm//array//write <class> idx <input>) - (jvm//array//read <class> idx) - (~) - <post> - (`)))] + [sampleI (expressionG;generate (|> (jvm//array//new +0 <class> size) + (jvm//array//write <class> idx <input>) + (jvm//array//read <class> idx) + (~) + <post> + (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -362,11 +362,11 @@ [#let [inner (|> ("jvm array new" +0 "java.lang.Double" (~ (code;nat size))) ("jvm array write" "java.lang.Double" (~ (code;nat idx)) (~ (code;frac valueD))) (`))] - sampleI (@;generate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size))) - ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner)) - ("jvm array read" "#Array" (~ (code;nat idx))) - ("jvm array read" "java.lang.Double" (~ (code;nat idx))) - (`)))] + sampleI (expressionG;generate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size))) + ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner)) + ("jvm array read" "#Array" (~ (code;nat idx))) + ("jvm array read" "java.lang.Double" (~ (code;nat idx))) + (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -376,7 +376,7 @@ false))) (test "jvm array length" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))] + [sampleI (expressionG;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -426,7 +426,7 @@ ($_ seq (test "jvm object null" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm object null?" ("jvm object null"))))] + [sampleI (expressionG;generate (` ("jvm object null?" ("jvm object null"))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -436,7 +436,7 @@ false))) (test "jvm object null?" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm object null?" (~ (code;int sample)))))] + [sampleI (expressionG;generate (` ("jvm object null?" (~ (code;int sample)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -446,7 +446,7 @@ false))) (test "jvm object synchronized" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))] + [sampleI (expressionG;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -457,10 +457,10 @@ (test "jvm object throw" (|> (do meta;Monad<Meta> [_ @runtime;generate - sampleI (@;generate (` ("lux try" ("lux function" +1 [] - ("jvm object throw" ("jvm member invoke constructor" - "java.lang.Throwable" - (~ exception-message$)))))))] + sampleI (expressionG;generate (` ("lux try" ("lux function" +1 [] + ("jvm object throw" ("jvm member invoke constructor" + "java.lang.Throwable" + (~ exception-message$)))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -475,7 +475,7 @@ false))) (test "jvm object class" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm object class" (~ (code;text class)))))] + [sampleI (expressionG;generate (` ("jvm object class" (~ (code;text class)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -485,7 +485,7 @@ false))) (test "jvm object instance?" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))] + [sampleI (expressionG;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -515,7 +515,7 @@ ($_ seq (test "jvm member static get" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))] + [sampleI (expressionG;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -525,8 +525,8 @@ false))) (test "jvm member static put" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor" - ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))] + [sampleI (expressionG;generate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor" + ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -536,7 +536,7 @@ false))) (test "jvm member virtual get" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))] + [sampleI (expressionG;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -546,9 +546,9 @@ false))) (test "jvm member virtual put" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" - ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String" - (~ (code;text other-sample-string)) (~ value-memberS)))))] + [sampleI (expressionG;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" + ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String" + (~ (code;text other-sample-string)) (~ value-memberS)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -573,7 +573,7 @@ ($_ seq (test "jvm member invoke static" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))] + [sampleI (expressionG;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -583,8 +583,8 @@ false))) (test "jvm member invoke virtual" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean" - (~ (code;int sample)) (~ object-longS))))] + [sampleI (expressionG;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean" + (~ (code;int sample)) (~ object-longS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -594,8 +594,8 @@ false))) (test "jvm member invoke interface" (|> (do meta;Monad<Meta> - [sampleI (@;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean" - (~ array-listS) (~ object-longS))))] + [sampleI (expressionG;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean" + (~ array-listS) (~ object-longS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) @@ -605,7 +605,7 @@ false))) (test "jvm member invoke constructor" (|> (do meta;Monad<Meta> - [sampleI (@;generate array-listS)] + [sampleI (expressionG;generate array-listS)] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success outputG) diff --git a/new-luxc/test/test/luxc/generator/reference.lux b/new-luxc/test/test/luxc/generator/reference.lux index 0e6f9ada5..9df6d8b10 100644 --- a/new-luxc/test/test/luxc/generator/reference.lux +++ b/new-luxc/test/test/luxc/generator/reference.lux @@ -12,7 +12,7 @@ ["_;" module] (generator [";G" statement] [";G" eval] - [";G" expr] + [";G" expression] [";G" case] [";G" runtime] (host ["$" jvm] @@ -47,7 +47,7 @@ (|> (do meta;Monad<Meta> [_ (_module;with-module +0 module-name (statementG;generate-def def-name Int valueI empty-metaI (' {}))) - sampleI (exprG;generate (code;symbol [module-name def-name]))] + sampleI (expressionG;generate (code;symbol [module-name def-name]))] (evalG;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -65,7 +65,7 @@ ($_ seq (test "Can refer to local variables/registers." (|> (do meta;Monad<Meta> - [sampleI (caseG;generate-let exprG;generate + [sampleI (caseG;generate-let expressionG;generate register (code;int value) (` ((~ (code;int (nat-to-int register))))))] diff --git a/new-luxc/test/test/luxc/generator/structure.lux b/new-luxc/test/test/luxc/generator/structure.lux index 3157d85d9..9143ba5c8 100644 --- a/new-luxc/test/test/luxc/generator/structure.lux +++ b/new-luxc/test/test/luxc/generator/structure.lux @@ -19,7 +19,7 @@ (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -69,7 +69,7 @@ members (r;list size gen-primitive)] (test "Can generate tuple." (|> (do meta;Monad<Meta> - [sampleI (@;generate (code;tuple members))] + [sampleI (expressionG;generate (code;tuple members))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -90,7 +90,7 @@ (test "Can generate variant." (|> (do meta;Monad<Meta> [runtime-bytecode @runtime;generate - sampleI (@;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))] + sampleI (expressionG;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) |