chroma/lexers/testdata/matlab.expected
2025-03-22 20:46:00 +13:00

69 lines
2.4 KiB
Text

[
{"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"}
]