瀏覽代碼

more lit assign tests

Getty Ritter 2 年之前
父節點
當前提交
d4ef0bb81c
共有 2 個文件被更改,包括 24 次插入0 次删除
  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",
+        [
+            "á",
+            "þ",
+            "ç",
+            "đ",
+        ],
+    ),
 ]