diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-09 14:15:05 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-09 14:15:05 +0200 |
commit | b2720858f841530581e009ae380e39b4267a3d5d (patch) | |
tree | 4b1e59aacc68d05cbeabd0d2fb30c34dd6f6e754 /context/data/scite/context/lexers/scite-context-lexer-lua.lua | |
parent | 09c6bc4b280905c198d7e40b3b6c3addc6f975ca (diff) | |
download | context-b2720858f841530581e009ae380e39b4267a3d5d.tar.gz |
2015-05-09 13:43:00
Diffstat (limited to 'context/data/scite/context/lexers/scite-context-lexer-lua.lua')
-rw-r--r-- | context/data/scite/context/lexers/scite-context-lexer-lua.lua | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer-lua.lua b/context/data/scite/context/lexers/scite-context-lexer-lua.lua index 3d5d18fc8..9bee74845 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-lua.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-lua.lua @@ -165,6 +165,7 @@ lexer.embed_lexer(lualexer, stringlexer, token("quote",longtwostart), token("str local integer = P("-")^-1 * (patterns.hexadecimal + patterns.decimal) local number = token("number", patterns.float + integer) + * (token("error",R("AZ","az","__")^1))^0 -- officially 127-255 are ok but not utf so useless @@ -197,12 +198,20 @@ local gotolabel = token("keyword", P("::")) * (spacing + shortcomment)^0 * token("keyword", P("::")) -local p_keywords = exact_match(keywords) -local p_functions = exact_match(functions) -local p_constants = exact_match(constants) +----- p_keywords = exact_match(keywords) +----- p_functions = exact_match(functions) +----- p_constants = exact_match(constants) +----- p_internals = P("__") +----- * exact_match(internals) + +local p_finish = #(1-R("az","AZ","__")) +local p_keywords = lexer.helpers.utfchartabletopattern(keywords) * p_finish -- exact_match(keywords) +local p_functions = lexer.helpers.utfchartabletopattern(functions) * p_finish -- exact_match(functions) +local p_constants = lexer.helpers.utfchartabletopattern(constants) * p_finish -- exact_match(constants) local p_internals = P("__") - * exact_match(internals) -local p_csnames = just_match(csnames) + * lexer.helpers.utfchartabletopattern(internals) * p_finish -- exact_match(internals) + +local p_csnames = lexer.helpers.utfchartabletopattern(csnames) * p_finish -- just_match(csnames) local keyword = token("keyword", p_keywords) local builtin = token("plain", p_functions) local constant = token("data", p_constants) |