diff options
| author | mitchell <unknown> | 2020-07-07 20:14:11 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2020-07-07 20:14:11 -0400 |
| commit | 329559b74b483576a74d5f87eebf951bd12b9200 (patch) | |
| tree | 4a200348748ccfdd27d1a3f8c0352758b9f9f4c8 /lexlua/awk.lua | |
| parent | 5f930428f724eef7dd0be4706670039b89f3523e (diff) | |
| download | scintilla-mirror-329559b74b483576a74d5f87eebf951bd12b9200.tar.gz | |
lexlua: Added `lexer.colors` and `lexer.styles` tables for themes and lexers.
This allows for a more Lua table-oriented approach to defining and using colors
and styles, instead of manually manipulating Scintilla property strings.
Themes and lexers are still backwards compatible, as the underlying mechanisms
are still in place.
Diffstat (limited to 'lexlua/awk.lua')
| -rw-r--r-- | lexlua/awk.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lexlua/awk.lua b/lexlua/awk.lua index 40ff501e7..a34730e1a 100644 --- a/lexlua/awk.lua +++ b/lexlua/awk.lua @@ -249,18 +249,18 @@ lex:add_style('field', lexer.STYLE_LABEL) -- sequences like '\S', '\s' have special meanings with Gawk. Tokens that -- contain them are displayed differently. lex:add_rule('gawkRegex', token('gawkRegex', SLASH * P(scanGawkRegex))) -lex:add_style('gawkRegex', lexer.STYLE_PREPROCESSOR .. ',underlined') +lex:add_style('gawkRegex', lexer.STYLE_PREPROCESSOR .. {underlined = true}) lex:add_rule('regex', token(lexer.REGEX, SLASH * P(scanRegex))) -- Operators. lex:add_rule('gawkOperator', token('gawkOperator', P("|&") + "@" + "**=" + "**")) -lex:add_style('gawkOperator', lexer.STYLE_OPERATOR .. ',underlined') +lex:add_style('gawkOperator', lexer.STYLE_OPERATOR .. {underlined = true}) lex:add_rule('operator', token(lexer.OPERATOR, S('!%&()*+,-/:;<=>?[\\]^{|}~'))) -- Numbers. lex:add_rule('gawkNumber', token('gawkNumber', lexer.hex_num + lexer.oct_num)) -lex:add_style('gawkNumber', lexer.STYLE_NUMBER .. ',underlined') +lex:add_style('gawkNumber', lexer.STYLE_NUMBER .. {underlined = true}) lex:add_rule('number', token(lexer.NUMBER, float)) -- Keywords. @@ -281,7 +281,8 @@ lex:add_rule('gawkBuiltInVariable', token('gawkBuiltInVariable', word_match[[ ARGIND BINMODE ERRNO FIELDWIDTHS FPAT FUNCTAB IGNORECASE LINT PREC PROCINFO ROUNDMODE RT SYMTAB TEXTDOMAIN ]])) -lex:add_style('gawkBuiltInVariable', lexer.STYLE_CONSTANT .. ',underlined') +lex:add_style( + 'gawkBuiltInVariable', lexer.STYLE_CONSTANT .. {underlined = true}) -- Functions. lex:add_rule('function', token(lexer.FUNCTION, lexer.word * #P('('))) |
