1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-09 13:23:51 +02:00

Rewote Lexer & Added Stylus Tests

This commit is contained in:
Jeremy Bolding 2020-10-22 16:25:35 -05:00 committed by Alec Thomas
parent ab89a09e29
commit 4453913798
3 changed files with 55 additions and 111 deletions

File diff suppressed because one or more lines are too long

4
lexers/testdata/stylus.actual vendored Normal file
View File

@ -0,0 +1,4 @@
$white ?= #fff
body {
color: $white;
}

19
lexers/testdata/stylus.expected vendored Normal file
View File

@ -0,0 +1,19 @@
[
{"type":"NameVariable", "value":"$white"},
{"type":"Text", "value":" "},
{"type":"Operator", "value":"?="},
{"type":"Text", "value":" "},
{"type":"LiteralNumberHex", "value":"#fff"},
{"type":"Text", "value":"\n"},
{"type":"NameTag","value":"body"},
{"type":"Text", "value":" "},
{"type":"Punctuation", "value":"{"},
{"type":"Text", "value":"\n "},
{"type":"NameProperty", "value":"color"},
{"type":"Punctuation", "value":":"},
{"type":"Text", "value":" "},
{"type":"NameVariable", "value":"$white"},
{"type":"Punctuation", "value":";"},
{"type":"Text", "value":"\n"},
{"type":"Punctuation", "value":"}"}
]