summaryrefslogtreecommitdiff
path: root/context/data/scite/context/lexers/scite-context-lexer-mps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-05-14 19:58:50 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-05-14 19:58:50 +0200
commitfd0c4577a4b6e85ca2db664906e1a03807ce133f (patch)
treefa23fcc04248d03ff82e34634b8ef1bb9cf28acb /context/data/scite/context/lexers/scite-context-lexer-mps.lua
parentdb581096187dc2d3cbdbe4cdc39d247c168b1607 (diff)
downloadcontext-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz
2017-05-14 19:15: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.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 },