Added lexars
This commit is contained in:
parent
382b2ce94b
commit
f9f64b0558
820 changed files with 149371 additions and 0 deletions
lexers/testdata
103
lexers/testdata/d.expected
vendored
Normal file
103
lexers/testdata/d.expected
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
[
|
||||
{"type":"KeywordNamespace","value":"module"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameNamespace","value":"foo"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"KeywordNamespace","value":"import"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameNamespace","value":"std.stdio"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"KeywordDeclaration","value":"class"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameClass","value":"C"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"{}"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"CommentMultiline","value":"/* comment1 */"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"CommentMultiline","value":"/+ comment2 +/"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"NameDecorator","value":"@"},
|
||||
{"type":"Operator","value":"("},
|
||||
{"type":"LiteralNumberInteger","value":"1"},
|
||||
{"type":"Operator","value":")"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"NameDecorator","value":"@nogc"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"KeywordType","value":"int"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameFunction","value":"main"},
|
||||
{"type":"Operator","value":"()"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"{"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"Name","value":"writeln"},
|
||||
{"type":"Operator","value":"("},
|
||||
{"type":"NameBuiltin","value":"__FILE__"},
|
||||
{"type":"Operator","value":");"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"auto"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"s"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralString","value":"r\"hi\"d"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"auto"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"w"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralString","value":"`hi`w"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"auto"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"q"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"q{"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"auto"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"w"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralString","value":"`hi`w"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"Operator","value":"};"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"enum"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"f"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralNumberFloat","value":"1.2fi"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"KeywordDeclaration","value":"enum"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":"d"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralNumberFloat","value":"0x1.FFFFFFFFFFFFFp1023"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"Keyword","value":"return"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralNumberInteger","value":"0"},
|
||||
{"type":"Operator","value":";"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"Operator","value":"}"},
|
||||
{"type":"Text","value":"\n"}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue