From c75ab6042f40f9101e88d41c1d41b5e41c3f12ef Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 26 Dec 2023 15:46:04 -0600 Subject: Add increment type --- lib/parser.mly | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/parser.mly') 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 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) } -- cgit v1.2.3