diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-06-20 19:48:48 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-06-20 19:48:48 +0200 |
commit | 739710f590371de17ae0debb4dc38b0de270b9f3 (patch) | |
tree | d276b89b59f554d065fba7b8d78dc57735d1be91 /context/data/scite/context/lexers/scite-context-lexer-cpp.lua | |
parent | c3e821627fba8ecf4342582ed62e75c5ad36afc0 (diff) | |
download | context-739710f590371de17ae0debb4dc38b0de270b9f3.tar.gz |
2019-06-20 18:53:00
Diffstat (limited to 'context/data/scite/context/lexers/scite-context-lexer-cpp.lua')
-rw-r--r-- | context/data/scite/context/lexers/scite-context-lexer-cpp.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua index d9079855f..7ad187eaf 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua @@ -46,6 +46,10 @@ local macros = { -- copied from cpp.lua "include", "line", "pragma", "undef", "using", "warning" } +local luatexs = { + "word", "halfword", "quarterword", "scaled", "pointer", "glueratio", +} + local space = patterns.space -- S(" \n\r\t\f\v") local any = patterns.any local restofline = patterns.restofline @@ -90,10 +94,12 @@ local operator = token("special", S("+-*/%^!=<>;:{}[]().&|?~")) local p_keywords = exact_match(keywords) local p_datatypes = exact_match(datatypes) local p_macros = exact_match(macros) +local p_luatexs = exact_match(luatexs) local keyword = token("keyword", p_keywords) local datatype = token("keyword", p_datatypes) local identifier = token("default", validword) +local luatex = token("command", p_luatexs) local macro = token("data", #P("#") * startofline * P("#") * S("\t ")^0 * p_macros) @@ -101,6 +107,7 @@ cpplexer._rules = { { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -121,6 +128,7 @@ if web then { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -140,6 +148,7 @@ else { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, |