Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct AST_Node {
- #ifdef DEBUG_MODE
- string expression;
- #endif
- jdip::token_t token; ///< A copy of the token which was used to create this node.
- };
- /// Child of AST_Node for unary operators.
- struct AST_Node_Unary: AST_Node {
- AST_Node *right; ///< The stuff we're operating on.
- };
- /// Child of AST_Node for binary operators.
- struct AST_Node_Binary: AST_Node {
- AST_Node *left, ///< The left-hand side of the expression.
- *right; ///< The right-hand side of the expression.
- };
- /// Child of AST_Node for the ternary operator.
- struct AST_Node_Ternary: AST_Node {
- AST_Node *exp, ///< The expression before the question marks.
- *left, ///< The left-hand (true) result.
- *right; ///< The right-hand (false) result.
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement