From 739710f590371de17ae0debb4dc38b0de270b9f3 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 20 Jun 2019 19:48:48 +0200 Subject: 2019-06-20 18:53:00 --- .../data/textadept/context/lexers/scite-context-lexer-cpp.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'context/data/textadept/context/lexers/scite-context-lexer-cpp.lua') 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 }, -- cgit v1.2.3