| 1 |
---input--- |
| 2 |
import "transforms/yellow.jslt" as yellow |
| 3 |
|
| 4 |
// Known valid types |
| 5 |
let valid-types = [ "SomeType" ] |
| 6 |
|
| 7 |
def foobar(arg) $arg.foobar |
| 8 |
|
| 9 |
{ |
| 10 |
"foobar": foobar(.), |
| 11 |
"is-valid": contains(.type, $valid-types), |
| 12 |
*: . |
| 13 |
} |
| 14 |
|
| 15 |
---tokens--- |
| 16 |
'import' Keyword.Namespace |
| 17 |
' ' Text.Whitespace |
| 18 |
'"transforms/yellow.jslt"' Literal.String.Symbol |
| 19 |
' ' Text.Whitespace |
| 20 |
'as' Keyword.Namespace |
| 21 |
' ' Text.Whitespace |
| 22 |
'yellow' Name.Namespace |
| 23 |
'\n\n' Text.Whitespace |
| 24 |
|
| 25 |
'// Known valid types\n' Comment.Single |
| 26 |
|
| 27 |
'let' Keyword.Declaration |
| 28 |
' ' Text.Whitespace |
| 29 |
'valid-types' Name.Variable |
| 30 |
' ' Text.Whitespace |
| 31 |
'=' Operator |
| 32 |
' ' Text.Whitespace |
| 33 |
'[' Punctuation |
| 34 |
' ' Text.Whitespace |
| 35 |
'"SomeType"' Literal.String.Double |
| 36 |
' ' Text.Whitespace |
| 37 |
']' Punctuation |
| 38 |
'\n\n' Text.Whitespace |
| 39 |
|
| 40 |
'def' Keyword.Declaration |
| 41 |
' ' Text.Whitespace |
| 42 |
'foobar' Name.Function |
| 43 |
'(' Punctuation |
| 44 |
'arg' Name.Variable |
| 45 |
')' Punctuation |
| 46 |
' ' Text.Whitespace |
| 47 |
'$arg' Name.Variable |
| 48 |
'.' Operator |
| 49 |
'foobar' Name |
| 50 |
'\n\n' Text.Whitespace |
| 51 |
|
| 52 |
'{' Punctuation |
| 53 |
'\n ' Text.Whitespace |
| 54 |
'"foobar"' Literal.String.Double |
| 55 |
':' Punctuation |
| 56 |
' ' Text.Whitespace |
| 57 |
'foobar' Name |
| 58 |
'(' Punctuation |
| 59 |
'.' Operator |
| 60 |
')' Punctuation |
| 61 |
',' Punctuation |
| 62 |
'\n ' Text.Whitespace |
| 63 |
'"is-valid"' Literal.String.Double |
| 64 |
':' Punctuation |
| 65 |
' ' Text.Whitespace |
| 66 |
'contains' Name.Builtin |
| 67 |
'(' Punctuation |
| 68 |
'.' Operator |
| 69 |
'type' Name |
| 70 |
',' Punctuation |
| 71 |
' ' Text.Whitespace |
| 72 |
'$valid-types' Name.Variable |
| 73 |
')' Punctuation |
| 74 |
',' Punctuation |
| 75 |
'\n ' Text.Whitespace |
| 76 |
'*' Operator |
| 77 |
':' Punctuation |
| 78 |
' ' Text.Whitespace |
| 79 |
'.' Operator |
| 80 |
'\n' Text.Whitespace |
| 81 |
|
| 82 |
'}' Punctuation |
| 83 |
'\n' Text.Whitespace |