Move definition closer to usage location
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 28 May 2018 18:35:23 +0000 (14:35 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 28 May 2018 18:35:39 +0000 (14:35 -0400)
tiger/src/lib/tiger/tiger_parser.mly

index 43ec10f..fee8888 100644 (file)
@@ -167,6 +167,21 @@ exp:
       "unit[]"
     }
 
+rec_field_assignments:
+  | ID EQ exp
+    {
+      let id = $1 in
+      let exp = $3 in
+      sprintf "%S = %s" id exp
+    }
+  | ID EQ exp COMMA rec_field_assignments
+    {
+      let id = $1 in
+      let exp = $3 in
+      let rec_field_assignments = $5 in
+      sprintf "%S = %s, %s" id exp rec_field_assignments
+    }
+
 exps:
   | exp
     {
@@ -269,21 +284,6 @@ tyfields:
       sprintf "%s, %s" tyfield tyfields
     }
 
-rec_field_assignments:
-  | ID EQ exp
-    {
-      let id = $1 in
-      let exp = $3 in
-      sprintf "%S = %s" id exp
-    }
-  | ID EQ exp COMMA rec_field_assignments
-    {
-      let id = $1 in
-      let exp = $3 in
-      let rec_field_assignments = $5 in
-      sprintf "%S = %s, %s" id exp rec_field_assignments
-    }
-
 fun_args:
   | exp
     {
This page took 0.039417 seconds and 4 git commands to generate.