-
-
Save SammyIsra/cf5cf8130bc418229ff9342bc7a5c677 to your computer and use it in GitHub Desktop.
Types associated with the Transformed AST Nodes
This file contains 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
interface ExpressionStatementNode { | |
type: "ExpressionStatement"; | |
expression: TransformedCallExpressionNode; | |
} | |
interface TransformedCallExpressionNode { | |
type: CallExpressionNode["type"]; | |
callee: IdentifierNode; | |
arguments: (TransformedCallExpressionNode | NumberLiteralNode | StringLiteralNode)[]; | |
} | |
interface IdentifierNode { | |
type: "Identifier"; | |
name: string; | |
} | |
/** The AST root node. It can only be of type "Program" */ | |
interface TransformedAST { | |
type: "Program"; | |
body: ExpressionStatementNode[]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment