aboutsummaryrefslogtreecommitdiff
path: root/lib/parser.mly
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2023-12-26 18:26:40 -0600
committerMarc Coquand <marc@mccd.space>2023-12-26 18:26:40 -0600
commit664b34059624d525d38da3e9e452a4bfc190a585 (patch)
treeef5558d350640e7ee206994559bbd1d87dad135d /lib/parser.mly
parent6c39f6ebc688c1ed751c08e7cc11016148cd3ce7 (diff)
downloadfixgen-664b34059624d525d38da3e9e452a4bfc190a585.tar.gz
fixgen-664b34059624d525d38da3e9e452a4bfc190a585.tar.bz2
fixgen-664b34059624d525d38da3e9e452a4bfc190a585.zip
Add support for username
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 e6bcb6d..177daaf 100644
--- a/lib/parser.mly
+++ b/lib/parser.mly
@@ -17,6 +17,7 @@
%token RBRACE
%token EMAIL
%token <string> STRING
+%token USERNAME
%start <ast_table option > prog
%%
@@ -30,6 +31,7 @@ id_or_other:
| UUIDV4 { "uuidv4" }
| INCREMENT { "increment" }
| EMAIL { "email" }
+ | USERNAME { "username" }
expr:
@@ -54,6 +56,9 @@ row:
| row_title = id_or_other; EMAIL; COMMA; r = row { Email (row_title, r) }
| row_title = id_or_other; EMAIL { Email (row_title, End) }
+ | row_title = id_or_other; USERNAME; COMMA; r = row { Username (row_title, r) }
+ | row_title = id_or_other; USERNAME { Username (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) }