aboutsummaryrefslogtreecommitdiff
path: root/lib/parser.mly
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2023-12-26 15:46:04 -0600
committerMarc Coquand <marc@mccd.space>2023-12-26 15:46:04 -0600
commitc75ab6042f40f9101e88d41c1d41b5e41c3f12ef (patch)
treed21b6771833e07b6f4b6cb58c4fbce109485d7c8 /lib/parser.mly
parent508c7c9b34a892d74d087f1ef5d54d16fa000551 (diff)
downloadfixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.tar.gz
fixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.tar.bz2
fixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.zip
Add increment type
Diffstat (limited to '')
-rw-r--r--lib/parser.mly5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/parser.mly b/lib/parser.mly
index 19fa44e..6172963 100644
--- a/lib/parser.mly
+++ b/lib/parser.mly
@@ -2,6 +2,7 @@
open Ast_types
%}
%token COMMA
+%token INCREMENT
%token <string> IDENTIFIER
%token UUIDV4
%token NEWLINE
@@ -26,6 +27,7 @@ id_or_other:
| IDENTIFIER { $1 }
| NAME { "name" }
| UUIDV4 { "uuidv4" }
+ | INCREMENT { "increment" }
expr:
@@ -47,6 +49,9 @@ row:
| row_title = id_or_other; NAME; COMMA; r = row { Name (row_title, r) }
| row_title = id_or_other; NAME { Name (row_title, End) }
+ | row_title = id_or_other; INCREMENT; COMMA; r = row { Increment (row_title, r) }
+ | row_title = id_or_other; INCREMENT { Increment (row_title, End) }
+
| row_title = id_or_other; const = STRING; COMMA; r = row { Const (row_title, const, r) }
| row_title = id_or_other; const = STRING { Const (row_title, const, End) }