diff options
author | Adrian Thurston <thurston@colm.net> | 2019-11-29 09:00:23 -0800 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-11-29 09:00:23 -0800 |
commit | aa76fc8781d820ec6bf42b92dd7a35f65e2e4612 (patch) | |
tree | f7b06a37eb4b38e1dbf45e36a6e3a727797191dd | |
parent | 5bc254cfc898b55154c10b8172aa85de0961e047 (diff) | |
download | colm-aa76fc8781d820ec6bf42b92dd7a35f65e2e4612.tar.gz |
allow use of token keyword for literal defs
refs #79
-rw-r--r-- | colm.vim | 2 | ||||
-rw-r--r-- | colm/colm.lm | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -74,7 +74,7 @@ syntax match qual "[a-zA-Z_][a-zA-Z_0-9]*::" syntax region defTypes matchgroup=defKeywords \ start="\<rl\>" start="\<def\>" start="\<token\>" start="\<ignore\>" - \ matchgroup=Function end="[a-zA-Z_][a-zA-Z0-9_]*" end="/"me=e-1 + \ matchgroup=Function end="[a-zA-Z_][a-zA-Z0-9_]*" end="/"me=e-1 end="`"me=e-1 syntax region redTypes matchgroup=redBlock \ start="\<reduction\>" diff --git a/colm/colm.lm b/colm/colm.lm index de647b89..1c475adc 100644 --- a/colm/colm.lm +++ b/colm/colm.lm @@ -321,8 +321,12 @@ def struct_key def struct_def [struct_key id ItemList: struct_item* END] +def literal_keyword + [LITERAL] +| [TOKEN] + def literal_def - [LITERAL literal_list] + [literal_keyword literal_list] def literal_list [literal_list literal_item] :Item |