diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-05-19 22:19:19 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-05-19 22:19:19 +0200 |
commit | 6a68bb9d4e7e8454b031143b9cd14edf3702a68d (patch) | |
tree | 14cb116ce0f1adc4459d6cea9aee07cacd3541fd /context/data/scite/context/lexers/scite-context-lexer-mps.lua | |
parent | 2e8819dad63db17febca68fd6b7ba9a06f9c50b5 (diff) | |
download | context-6a68bb9d4e7e8454b031143b9cd14edf3702a68d.tar.gz |
2018-05-19 21:51: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.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) |