]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/StringInterpolation2.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / StringInterpolation2.scl
index 9d219430b9520594f56ee97327d09a09bbeaf009..e6ad8e114f28ffb26d1a4c171c5948d07f6050d1 100644 (file)
@@ -1,6 +1,9 @@
-stringSum :: String -> Integer\r
-stringSum "(\(a),\(b),\(c))" = a + b + c\r
+import "Prelude"\r
 \r
-main = stringSum "(1,2,3)"\r
+main = match "abc123def" with\r
+      "abc\(x)fed" -> "X\(x)"\r
+      "cba\(x)def" -> "Y\(x)"\r
+      "abc\(x)def" -> "Z\(x)"\r
+      x            -> "W\(x)"\r
 --\r
-6
\ No newline at end of file
+Z123
\ No newline at end of file