Advertisement
JoshDreamland

Untitled

Dec 31st, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1.     struct AST_Node {
  2.       #ifdef DEBUG_MODE
  3.       string expression;
  4.       #endif
  5.       jdip::token_t token; ///< A copy of the token which was used to create this node.
  6.     };
  7.     /// Child of AST_Node for unary operators.
  8.     struct AST_Node_Unary: AST_Node {
  9.       AST_Node *right; ///< The stuff we're operating on.
  10.     };
  11.     /// Child of AST_Node for binary operators.
  12.     struct AST_Node_Binary: AST_Node {
  13.       AST_Node *left, ///< The left-hand side of the expression.
  14.                *right; ///< The right-hand side of the expression.
  15.     };
  16.     /// Child of AST_Node for the ternary operator.
  17.     struct AST_Node_Ternary: AST_Node {
  18.       AST_Node *exp, ///< The expression before the question marks.
  19.                *left, ///< The left-hand (true) result.
  20.                *right; ///< The right-hand (false) result.
  21.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement