diff options
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.lua | 9 |
1 files changed, 6 insertions, 3 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 1c87ea6d0..5428d3543 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-mps.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-mps.lua @@ -91,9 +91,12 @@ local plain = token("plain", exact_match(metapostcommands)) local quoted = token("quote", dquote) * token("string", P(1-dquote)^0) * token("quote", dquote) -local texstuff = token("quote", P("btex ") + P("verbatimtex ")) - * token("string", P(1-P(" etex"))^0) - * token("quote", P(" etex")) +local separator = P(" ") + S("\n\r")^1 +local btex = (P("btex") + P("verbatimtex")) * separator +local etex = separator * P("etex") +local texstuff = token("quote", btex) + * token("string", (1-etex)^0) + * token("quote", etex) local primitive = token("primitive", exact_match(metapostprimitives)) local identifier = token("default", cstoken^1) local number = token("number", number) |