diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-07-06 22:05:18 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-07-06 22:05:18 +0200 |
commit | 82c674fdcf5bcff4ad0dc0936d638fc729145616 (patch) | |
tree | 6ab4ee4417aa22180cd5b3c50ede6a031f8ce3f9 /context/data/scite/context/lexers/scite-context-lexer.lua | |
parent | 3a55e11c7295abf8f2dfe5e9d1c8b153f4518824 (diff) | |
download | context-82c674fdcf5bcff4ad0dc0936d638fc729145616.tar.gz |
2022-07-06 21:35:00
Diffstat (limited to 'context/data/scite/context/lexers/scite-context-lexer.lua')
-rw-r--r-- | context/data/scite/context/lexers/scite-context-lexer.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer.lua b/context/data/scite/context/lexers/scite-context-lexer.lua index 7eafa1c31..2efe23916 100644 --- a/context/data/scite/context/lexers/scite-context-lexer.lua +++ b/context/data/scite/context/lexers/scite-context-lexer.lua @@ -193,6 +193,14 @@ do patterns.float = float patterns.cardinal = decimal + local utf8next = R("\128\191") + + patterns.utf8next = utf8next + patterns.utf8one = R("\000\127") + patterns.utf8two = R("\194\223") * utf8next + patterns.utf8three = R("\224\239") * utf8next * utf8next + patterns.utf8four = R("\240\244") * utf8next * utf8next * utf8next + patterns.signeddecimal = sign^-1 * decimal patterns.signedoctal = sign^-1 * octal patterns.signedhexadecimal = sign^-1 * hexadecimal @@ -269,6 +277,11 @@ do local utf8three = R("\224\239") * utf8next * utf8next local utf8four = R("\240\244") * utf8next * utf8next * utf8next + helpers.utf8one = utf8one + helpers.utf8two = utf8two + helpers.utf8three = utf8three + helpers.utf8four = utf8four + local utfidentifier = utf8two + utf8three + utf8four helpers.utfidentifier = (R("AZ","az","__") + utfidentifier) * (R("AZ","az","__","09") + utfidentifier)^0 |