Bladeren bron

more lit assign tests

Getty Ritter 3 jaren geleden
bovenliggende
commit
d4ef0bb81c
2 gewijzigde bestanden met toevoegingen van 24 en 0 verwijderingen
  1. 6 0
      tests/assn.matzo
  2. 18 0
      tests/assn.parsed

+ 6 - 0
tests/assn.matzo

@@ -1,3 +1,9 @@
 (* testing simple assignment statements *)
 x := 5;
 y := This;
+
+(* literal assignment statements *)
+a ::= a b c d;
+
+(* with unicode *)
+fóo ::= á þ ç đ;

+ 18 - 0
tests/assn.parsed

@@ -37,4 +37,22 @@
             ],
         ),
     ),
+    LitAssn(
+        "a",
+        [
+            "a",
+            "b",
+            "c",
+            "d",
+        ],
+    ),
+    LitAssn(
+        "fóo",
+        [
+            "á",
+            "þ",
+            "ç",
+            "đ",
+        ],
+    ),
 ]