mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 05:22:23 +00:00
28 lines
675 B
Plaintext
28 lines
675 B
Plaintext
---input---
|
|
var = if true == 1 then -1 else 0 fi
|
|
|
|
---tokens---
|
|
'var' Text
|
|
' ' Text.Whitespace
|
|
'=' Operator
|
|
' ' Text.Whitespace
|
|
'if' Keyword
|
|
' ' Text.Whitespace
|
|
'true' Text
|
|
' ' Text.Whitespace
|
|
'==' Operator
|
|
' ' Text.Whitespace
|
|
'1' Literal.Number
|
|
' ' Text.Whitespace
|
|
'then' Keyword
|
|
' ' Text.Whitespace
|
|
'-' Operator
|
|
'1' Literal.Number
|
|
' ' Text.Whitespace
|
|
'else' Keyword
|
|
' ' Text.Whitespace
|
|
'0' Literal.Number
|
|
' ' Text.Whitespace
|
|
'fi' Keyword
|
|
'\n' Text.Whitespace
|