Last active
October 5, 2023 15:54
-
-
Save conartist6/e58922d3f4a8835f98ccfe5c4e915175 to your computer and use it in GitHub Desktop.
@bablr/boot sample instruction AST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// eat(<| Token 'foo' |> | |
{ | |
"tagName": { | |
"language": "Instruction", | |
"type": "Call" | |
}, | |
"children": [ | |
{ | |
"type": "Reference", | |
"value": "verb" | |
}, | |
{ | |
"type": "Reference", | |
"value": "open" | |
}, | |
{ | |
"type": "Reference", | |
"value": "argument" | |
}, | |
{ | |
"type": "Reference", | |
"value": "close" | |
} | |
], | |
"properties": { | |
"verb": { | |
"tagName": { | |
"language": "Instruction", | |
"type": "Identifier" | |
}, | |
"children": [ | |
"eat" | |
], | |
"attrs": {} | |
}, | |
"open": { | |
"tagName": { | |
"language": "Instruction", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
"(" | |
], | |
"attrs": {} | |
}, | |
"argument": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "TokenMatcher" | |
}, | |
"children": [ | |
{ | |
"type": "Reference", | |
"value": "open" | |
}, | |
{ | |
"type": "Trivia", | |
"value": " " | |
}, | |
{ | |
"type": "Reference", | |
"value": "tagName" | |
}, | |
{ | |
"type": "Trivia", | |
"value": " " | |
}, | |
{ | |
"type": "Reference", | |
"value": "value" | |
}, | |
{ | |
"type": "Trivia", | |
"value": " " | |
}, | |
{ | |
"type": "Reference", | |
"value": "close" | |
} | |
], | |
"properties": { | |
"open": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
"<|" | |
], | |
"attrs": {} | |
}, | |
"tagName": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Identifier" | |
}, | |
"children": [ | |
"Token" | |
], | |
"attrs": {} | |
}, | |
"value": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "StringMatcher" | |
}, | |
"children": [ | |
{ | |
"type": "Reference", | |
"value": "open" | |
}, | |
{ | |
"type": "Reference", | |
"value": "value" | |
}, | |
{ | |
"type": "Reference", | |
"value": "close" | |
} | |
], | |
"properties": { | |
"open": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
"'" | |
], | |
"attrs": {} | |
}, | |
"value": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Literal" | |
}, | |
"children": [ | |
"foo" | |
], | |
"attrs": {} | |
}, | |
"close": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
"'" | |
], | |
"attrs": {} | |
} | |
}, | |
"attrs": {} | |
}, | |
"close": { | |
"tagName": { | |
"language": "Spamex", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
"|>" | |
], | |
"attrs": {} | |
} | |
}, | |
"attrs": {} | |
}, | |
"close": { | |
"tagName": { | |
"language": "Instruction", | |
"type": "Punctuator" | |
}, | |
"children": [ | |
")" | |
], | |
"attrs": {} | |
} | |
}, | |
"attrs": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment