summaryrefslogtreecommitdiff
path: root/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'context/data/textadept/context/lexers/scite-context-lexer-cpp.lua')
-rw-r--r--context/data/textadept/context/lexers/scite-context-lexer-cpp.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua b/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua
index d9079855f..7ad187eaf 100644
--- a/context/data/textadept/context/lexers/scite-context-lexer-cpp.lua
+++ b/context/data/textadept/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 },