summaryrefslogtreecommitdiff
path: root/context/data/scite/context/lexers/scite-context-lexer-mps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-08-18 22:51:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-08-18 22:51:53 +0200
commitf72c2cf29d36ae836c894bad29dfd965d1af0236 (patch)
tree48ad8b3bf6b60b91118b5573ebcf9ea783285dfb /context/data/scite/context/lexers/scite-context-lexer-mps.lua
parent91b59bb4f8b33701c69e095841fe4cf57971ac20 (diff)
downloadcontext-f72c2cf29d36ae836c894bad29dfd965d1af0236.tar.gz
2019-08-18 22:26:00
Diffstat (limited to 'context/data/scite/context/lexers/scite-context-lexer-mps.lua')
-rw-r--r--context/data/scite/context/lexers/scite-context-lexer-mps.lua4
1 files changed, 4 insertions, 0 deletions
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 },