diff options
author | mitchell <unknown> | 2018-08-10 09:04:15 -0400 |
---|---|---|
committer | mitchell <unknown> | 2018-08-10 09:04:15 -0400 |
commit | 3b8a22c3a9cfe053856af925890cd60e775d497b (patch) | |
tree | d51e17cc14b6e6ee62ec08c0016187b3014477d2 /lexlua | |
parent | c2a216a1e575d4b0fe5bd6f8936b7a6d1e9abe54 (diff) | |
download | scintilla-mirror-3b8a22c3a9cfe053856af925890cd60e775d497b.tar.gz |
lexlua: Updated ConTeXt lexer.
Diffstat (limited to 'lexlua')
-rw-r--r-- | lexlua/context.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lexlua/context.lua b/lexlua/context.lua index 5b3510671..a6e6eb4ba 100644 --- a/lexlua/context.lua +++ b/lexlua/context.lua @@ -27,14 +27,18 @@ lex:add_rule('section', token('section', '\\' * word_match[[ lex:add_style('section', lexer.STYLE_CLASS) -- Commands. -lex:add_rule('command', token(lexer.KEYWORD, '\\' * - (lexer.alpha^1 + S('#$&~_^%{}')))) +local command = token('command', '\\' * (lexer.alpha^1 * + ('\\' * lexer.alpha^0)^-1 + + S('#$&~_^%{}\\'))) +lex:add_rule('command', command) +lex:add_style('command', lexer.STYLE_KEYWORD) -- Operators. lex:add_rule('operator', token(lexer.OPERATOR, S('$&#{}[]'))) -- Fold points. lex:add_fold_point('environment', '\\start', '\\stop') +lex:add_fold_point('command', '\\begin', '\\end') lex:add_fold_point(lexer.OPERATOR, '{', '}') lex:add_fold_point(lexer.COMMENT, '%', lexer.fold_line_comments('%')) |