From f72c2cf29d36ae836c894bad29dfd965d1af0236 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 18 Aug 2019 22:51:53 +0200 Subject: 2019-08-18 22:26:00 --- context/data/scite/context/lexers/scite-context-lexer-mps.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'context/data/scite/context/lexers/scite-context-lexer-mps.lua') diff --git a/context/data/scite/context/lexers/scite-context-lexer-mps.lua b/context/data/scite/context/lexers/scite-context-lexer-mps.lua index 4bbfae03c..356bf1f6b 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-mps.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-mps.lua @@ -86,6 +86,7 @@ local rest = token("default", any) local comment = token("comment", P("%") * (1-S("\n\r"))^0) local internal = token("reserved", exact_match(mergedshortcuts,false)) local shortcut = token("data", exact_match(mergedinternals)) + local helper = token("command", exact_match(metafuncommands)) local plain = token("plain", exact_match(metapostcommands)) local quoted = token("quote", dquote) @@ -128,9 +129,12 @@ lexer.embed_lexer(metafunlexer, cldlexer, startluacode, stopluacode) local luacall = token("embedded",P("lua") * ( P(".") * R("az","AZ","__")^1 )^1) +local keyword = token("default", (R("AZ","az","__")^1) * # P(space^0 * P("="))) + metafunlexer._rules = { { "whitespace", spacing }, { "comment", comment }, + { "keyword", keyword }, -- experiment, maybe to simple { "internal", internal }, { "shortcut", shortcut }, { "luacall", luacall }, -- cgit v1.2.3