浏览代码

add some more tests

Getty Ritter 3 年之前
父节点
当前提交
f68803881e
共有 4 个文件被更改,包括 30 次插入0 次删除
  1. 2 0
      tests/assn.matzo
  2. 18 0
      tests/assn.parsed
  3. 1 0
      tests/atom_lit.matzo
  4. 9 0
      tests/atom_lit.parsed

+ 2 - 0
tests/assn.matzo

@@ -0,0 +1,2 @@
+x := 5;
+y := This;

+ 18 - 0
tests/assn.parsed

@@ -0,0 +1,18 @@
+[
+    Assn(
+        "x",
+        Lit(
+            Num(
+                5,
+            ),
+        ),
+    ),
+    Assn(
+        "y",
+        Lit(
+            Atom(
+                "This",
+            ),
+        ),
+    ),
+]

+ 1 - 0
tests/atom_lit.matzo

@@ -0,0 +1 @@
+puts Foo

+ 9 - 0
tests/atom_lit.parsed

@@ -0,0 +1,9 @@
+[
+    Puts(
+        Lit(
+            Atom(
+                "Foo",
+            ),
+        ),
+    ),
+]