]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Macros2.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Macros2.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Macros2.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Macros2.scl
new file mode 100644 (file)
index 0000000..d1379cd
--- /dev/null
@@ -0,0 +1,13 @@
+import "JavaBuiltin" as Java\r
+\r
+(==) = Java.icmpeq\r
+\r
+@macro\r
+(&<&) :: Integer -> Integer -> Integer\r
+a &<& b = if cmp == 0 then b else cmp\r
+  where   \r
+    cmp = a\r
+\r
+main = 3 &<& 7\r
+--\r
+3
\ No newline at end of file