diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-22 22:33:21 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-22 22:33:21 +0200 |
commit | dd7c4b1a54bfc5e358eb9f766c0b865fc47cbe46 (patch) | |
tree | 2e8888da6188eb742a98c3c05a26e2b75b198e62 /context/data/scite/context/lexers/scite-context-lexer-lua.lua | |
parent | 50928735daee408de73737b055b2535d96424824 (diff) | |
download | context-dd7c4b1a54bfc5e358eb9f766c0b865fc47cbe46.tar.gz |
2016-07-22 20:13: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 | 17 |
1 files changed, 9 insertions, 8 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 9bee74845..973fe3c2a 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-lua.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-lua.lua @@ -80,7 +80,8 @@ local depricated = { local csnames = { -- todo: option "commands", "context", - "ctx", +-- "ctxcmd", +-- "ctx", "metafun", "metapost", } @@ -211,17 +212,17 @@ local p_constants = lexer.helpers.utfchartabletopattern(constants) * p_finish local p_internals = P("__") * lexer.helpers.utfchartabletopattern(internals) * p_finish -- exact_match(internals) -local p_csnames = lexer.helpers.utfchartabletopattern(csnames) * p_finish -- just_match(csnames) +local p_csnames = lexer.helpers.utfchartabletopattern(csnames) -- * p_finish -- just_match(csnames) +local p_ctnames = P("ctx") * R("AZ","az","__")^0 local keyword = token("keyword", p_keywords) local builtin = token("plain", p_functions) local constant = token("data", p_constants) local internal = token("data", p_internals) -local csname = token("user", p_csnames) - * ( - optionalspace * hasargument - + ( optionalspace * token("special", S(".:")) * optionalspace * token("user", validword ) )^1 - + token("user", P("_") * validsuffix) - ) +local csname = token("user", p_csnames + p_ctnames) + * p_finish * optionalspace * ( + hasargument + + ( token("special", S(".:")) * optionalspace * token("user", validword) )^1 + )^-1 local identifier = token("default", validword) * ( optionalspace * token("special", S(".:")) * optionalspace * ( |