This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/matlab/test_keywords_ended_by_newline.txt
Georg Brandl b40b0cca06 Rename "tests/lexers" to "tests/snippets" and update the contribution
docs to point to both snippets and examplefiles.
2021-01-20 10:57:30 +01:00

36 lines
811 B
Text

# Test that keywords on their own line are marked as keywords.
---input---
if x > 100
disp('x > 100')
else
disp('x < 100')
end
---tokens---
'if' Keyword
' ' Text.Whitespace
'x' Name
' ' Text.Whitespace
'>' Operator
' ' Text.Whitespace
'100' Literal.Number.Integer
'\n ' Text.Whitespace
'disp' Name.Builtin
'(' Punctuation
"'" Literal.String
"x > 100'" Literal.String
')' Punctuation
'\n' Text.Whitespace
'else' Keyword
'\n ' Text.Whitespace
'disp' Name.Builtin
'(' Punctuation
"'" Literal.String
"x < 100'" Literal.String
')' Punctuation
'\n' Text.Whitespace
'end' Keyword
'\n' Text.Whitespace