BinaryOperatorAST.hpp
上传用户:afrynkmhm
上传日期:2007-01-06
资源大小:1262k
文件大小:1k
- #ifndef INC_BinaryOperatorAST_hpp__
- #define INC_BinaryOperatorAST_hpp__
- //#include "antlr/ASTNode.hpp"
- #include "antlr/AST.hpp"
- #include "CalcAST.hpp"
- class BinaryOperatorAST : public CalcAST {
- public:
- RefCalcAST left() const
- {
- return RefCalcAST(getFirstChild());
- }
- RefCalcAST right() const
- {
- RefCalcAST t = left();
- if ( !t ) return t;
- return RefCalcAST(t->getNextSibling());
- }
- };
- typedef ANTLR_USE_NAMESPACE(antlr)ASTRefCount<BinaryOperatorAST> RefBinaryOperatorAST;
- #endif //INC_BinaryOperatorAST_hpp__