summaryrefslogtreecommitdiff
path: root/context/data/scite/context/lexers/scite-context-lexer-mps.lua
diff options
context:
space:
mode:
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.lua6
1 files changed, 4 insertions, 2 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 fa335eb3f..1c87ea6d0 100644
--- a/context/data/scite/context/lexers/scite-context-lexer-mps.lua
+++ b/context/data/scite/context/lexers/scite-context-lexer-mps.lua
@@ -10,7 +10,7 @@ local global, string, table, lpeg = _G, string, table, lpeg
local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
local type = type
-local lexer = require("lexer")
+local lexer = require("scite-context-lexer")
local context = lexer.context
local patterns = context.patterns
@@ -98,7 +98,8 @@ local primitive = token("primitive", exact_match(metapostprimitives))
local identifier = token("default", cstoken^1)
local number = token("number", number)
local grouping = token("grouping", S("()[]{}")) -- can be an option
-local special = token("special", S("#()[]{}<>=:\"")) -- or else := <> etc split
+local suffix = token("number", P("#@") + P("@#") + P("#"))
+local special = token("special", P("#@") + P("@#") + S("#()[]{}<>=:\"")) -- or else := <> etc split
local texlike = token("warning", P("\\") * cstokentex^1)
local extra = token("extra", P("+-+") + P("++") + S("`~%^&_-+*/\'|\\"))
@@ -134,6 +135,7 @@ metafunlexer._rules = {
{ "primitive", primitive },
{ "luacall", luacall },
{ "texstuff", texstuff },
+ { "suffix", suffix },
{ "identifier", identifier },
{ "number", number },
{ "quoted", quoted },