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/scala/test_default_parameter.txt
2022-01-06 18:34:29 +01:00

37 lines
986 B
Text

---input---
def f(using y: Char = if true then 'a' else 2): Int = ???
---tokens---
'def' Keyword
' ' Text.Whitespace
'f' Name.Function
'(' Punctuation
'using' Keyword
' ' Text.Whitespace
'y' Name
':' Punctuation
' ' Text.Whitespace
'Char' Name.Class
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'if' Keyword
' ' Text.Whitespace
'true' Keyword.Constant
' ' Text.Whitespace
'then' Keyword
' ' Text.Whitespace
"'a'" Literal.String.Char
' ' Text.Whitespace
'else' Keyword
' ' Text.Whitespace
'2' Literal.Number.Integer
')' Punctuation
':' Punctuation
' ' Text.Whitespace
'Int' Name.Class
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'???' Operator
'\n' Text.Whitespace