diff options
Diffstat (limited to 'Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua')
-rw-r--r-- | Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua b/Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua index d9079855fa7..a50cdaa1756 100644 --- a/Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua +++ b/Master/texmf-dist/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua @@ -28,6 +28,7 @@ local keywords = { -- copied from cpp.lua "restrict", -- hm "_Bool", "_Complex", "_Pragma", "_Imaginary", + "boolean", -- c++. "catch", "class", "const_cast", "delete", "dynamic_cast", "explicit", "export", "friend", "mutable", "namespace", "new", "operator", "private", @@ -46,6 +47,11 @@ local macros = { -- copied from cpp.lua "include", "line", "pragma", "undef", "using", "warning" } +local luatexs = { + "word", "halfword", "quarterword", "scaledwhd", "scaled", "pointer", "glueratio", "strnumber", + "dumpstream", "memoryword", +} + local space = patterns.space -- S(" \n\r\t\f\v") local any = patterns.any local restofline = patterns.restofline @@ -90,10 +96,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 +109,7 @@ cpplexer._rules = { { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -121,6 +130,7 @@ if web then { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, @@ -140,6 +150,7 @@ else { "whitespace", spacing }, { "keyword", keyword }, { "type", datatype }, + { "luatex", luatex }, { "identifier", identifier }, { "string", shortstring }, { "longcomment", longcomment }, |