mirror of
https://github.com/jamiebuilds/the-super-tiny-compiler.git
synced 2024-10-27 20:34:08 +00:00
change interface for visitor in description
This commit is contained in:
parent
386d1efd5b
commit
4f7a85a9f8
@ -709,16 +709,31 @@ function parser(tokens) {
|
||||
* encounter a node with a matching type.
|
||||
*
|
||||
* traverse(ast, {
|
||||
* Program(node, parent) {
|
||||
* // ...
|
||||
* Program: {
|
||||
* enter(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* exit(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* },
|
||||
*
|
||||
* CallExpression(node, parent) {
|
||||
* // ...
|
||||
* CallExpression: {
|
||||
* enter(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* exit(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* },
|
||||
*
|
||||
* NumberLiteral(node, parent) {
|
||||
* // ...
|
||||
* NumberLiteral: {
|
||||
* enter(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* exit(node, parent) {
|
||||
* // ...
|
||||
* },
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user