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/c/test_label_followed_by_statement.txt
Matthäus G. Chajdas a537d5e966 Use the correct whitespace token for the C family.
The CFamilyLexer was matching whitespace as Text instead of Whitespace.
2021-06-20 11:42:04 +02:00

35 lines
703 B
Text

---input---
int main()
{
foo:return 0;
goto foo;
}
---tokens---
'int' Keyword.Type
' ' Text.Whitespace
'main' Name.Function
'(' Punctuation
')' Punctuation
'\n' Text.Whitespace
'{' Punctuation
'\n' Text.Whitespace
'foo' Name.Label
':' Punctuation
'return' Keyword
' ' Text.Whitespace
'0' Literal.Number.Integer
';' Punctuation
'\n' Text.Whitespace
' ' Text.Whitespace
'goto' Keyword
' ' Text.Whitespace
'foo' Name
';' Punctuation
'\n' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace