Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Cover the rest of syntax-highlight's output
No token ever took hl-type or hl-comment, so a typo in either row, or a
rule gone from the stylesheet, passed. Nothing fed the filter a NUL
byte or a blob of exactly the size cap either.
Diffstat (limited to 'tests/extensions/fake-lexers')
| -rw-r--r-- | tests/extensions/fake-lexers/lexer.lua | 11 |
1 file changed, 7 insertions, 4 deletions
diff --git a/tests/extensions/fake-lexers/lexer.lua b/tests/extensions/fake-lexers/lexer.lua index c9d8cff..a43e8e6 100644 --- a/tests/extensions/fake-lexers/lexer.lua +++ b/tests/extensions/fake-lexers/lexer.lua @@ -11,13 +11,16 @@ local M = {} -- Tokens come back the way Scintillua returns them, one flat list of a tag -- name and the position just past the token it names. Letter runs are --- keywords, digit runs are numbers, a single quoted run carries a dotted tag --- so the dotted first component lookup gets exercised, a run after a colon or --- a dollar sign takes one of the tags only the css lexer uses, and any other --- byte is whitespace, which maps to no css class. +-- keywords, or types when capitalised, digit runs are numbers, the rest of a +-- line after two dashes is a comment, a single quoted run carries a dotted +-- tag so the dotted first component lookup gets exercised, a run after a +-- colon or a dollar sign takes one of the tags only the css lexer uses, and +-- any other byte is whitespace, which maps to no css class. local patterns = { { "^:%a+", "pseudoclass" }, { "^%$%a+", "property" }, + { "^%-%-[^\n]*", "comment" }, + { "^%u%a*", "type" }, { "^%a+", "keyword" }, { "^%d+", "number" }, { "^'[^']*'", "string.double" }, |
