diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-10-07 07:31:21 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-10-07 07:42:51 +0200 |
| commit | 4e8e356e94533cc2d47aec804cdc86dbb0fca530 (patch) | |
| tree | 3e69ac1ad2b4f3e0a3f635d5b2eedb95200e8761 /lexers/crystal.lua | |
| parent | ca0ce4631c2474088f4ee0943d45397460fec3a7 (diff) | |
| download | vis-4e8e356e94533cc2d47aec804cdc86dbb0fca530.tar.gz vis-4e8e356e94533cc2d47aec804cdc86dbb0fca530.tar.xz | |
lexers: sync with scintillua changeset 571 rev 23435f1d82da
This fixes ":set syntax text" and adds a missing file association
for the taskpaper lexer.
The protobuf and crystal lexers were slightly reformatted,
but should contain no functional changes.
Diffstat (limited to 'lexers/crystal.lua')
| -rw-r--r-- | lexers/crystal.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lexers/crystal.lua b/lexers/crystal.lua index 4af2fef..8766e96 100644 --- a/lexers/crystal.lua +++ b/lexers/crystal.lua @@ -48,7 +48,8 @@ end) -- TODO: regex_str fails with `obj.method /patt/` syntax. local regex_str = #P('/') * l.last_char_includes('!%^&*([{-=+|:;,?<>~') * l.delimited_range('/', true, false) * S('iomx')^0 -local string = token(l.STRING, (sq_str + dq_str + heredoc + cmd_str) * S('f')^-1) + +local string = token(l.STRING, (sq_str + dq_str + heredoc + cmd_str) * + S('f')^-1) + token(l.REGEX, regex_str) local word_char = l.alnum + S('_!?') @@ -63,22 +64,20 @@ local number = token(l.NUMBER, l.float * S('ri')^-1 + integer + numeric_literal) -- Keywords. local keyword = token(l.KEYWORD, word_match({ - 'alias', 'begin', 'break', 'case', 'class', 'def', 'defined?', - 'do', 'else', 'elsif', 'end', 'ensure', 'false', 'for', 'if', - 'in', 'module', 'next', 'nil', 'not', 'redo', 'rescue', 'retry', - 'return', 'self', 'super', 'then', 'true', 'undef', 'unless', - 'until', 'when', 'while', 'yield', '__FILE__', '__LINE__' + 'alias', 'begin', 'break', 'case', 'class', 'def', 'defined?', 'do', 'else', + 'elsif', 'end', 'ensure', 'false', 'for', 'if', 'in', 'module', 'next', 'nil', + 'not', 'redo', 'rescue', 'retry', 'return', 'self', 'super', 'then', 'true', + 'undef', 'unless', 'until', 'when', 'while', 'yield', '__FILE__', '__LINE__' }, '?!')) -- Functions. local func = token(l.FUNCTION, word_match({ 'abort', 'at_exit', 'caller', 'delay', 'exit', 'fork', 'future', - 'get_stack_top', 'gets', 'lazy', 'loop', 'main', 'p', 'print', - 'printf', 'puts', 'raise', 'rand', 'read_line', 'require', 'sleep', - 'spawn', 'sprintf', 'system', 'with_color', + 'get_stack_top', 'gets', 'lazy', 'loop', 'main', 'p', 'print', 'printf', + 'puts', 'raise', 'rand', 'read_line', 'require', 'sleep', 'spawn', 'sprintf', + 'system', 'with_color', -- Macros - 'assert_responds_to', 'debugger', 'parallel', 'pp', 'record', - 'redefine_main' + 'assert_responds_to', 'debugger', 'parallel', 'pp', 'record', 'redefine_main' }, '?!')) * -S('.:|') -- Identifiers. |
