Added lexars

This commit is contained in:
Toastie 2025-03-22 20:46:00 +13:00
parent 382b2ce94b
commit f9f64b0558
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
820 changed files with 149371 additions and 0 deletions
lexers/testdata

69
lexers/testdata/matlab.expected vendored Normal file
View file

@ -0,0 +1,69 @@
[
{"type":"Comment","value":"% a sum function"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"function"},
{"type":"TextWhitespace","value":" "},
{"type":"Text","value":"p "},
{"type":"Punctuation","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"NameFunction","value":"vector_sum"},
{"type":"Punctuation","value":"("},
{"type":"Text","value":"x"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Name","value":"p"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralNumberInteger","value":"0"},
{"type":"Punctuation","value":";"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"for"},
{"type":"Text","value":" "},
{"type":"Name","value":"k1"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":":"},
{"type":"NameBuiltin","value":"length"},
{"type":"Punctuation","value":"("},
{"type":"Name","value":"x"},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n "},
{"type":"Name","value":"p"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"p"},
{"type":"Text","value":" "},
{"type":"Operator","value":"+"},
{"type":"Text","value":" "},
{"type":"Name","value":"x"},
{"type":"Punctuation","value":"("},
{"type":"Name","value":"k1"},
{"type":"Punctuation","value":");"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"end"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"end"},
{"type":"Text","value":"\n\n"},
{"type":"Name","value":"z"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":":"},
{"type":"LiteralNumberInteger","value":"10"},
{"type":"Punctuation","value":";"},
{"type":"Text","value":"\n"},
{"type":"Name","value":"sum_from_1_to_10"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"vector_sum"},
{"type":"Punctuation","value":"("},
{"type":"Name","value":"z"},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n"}
]