/** * Constructor. * * @param pTree The root or start node of the expression. * @param pExpressionType One of the constants defined by <code> * ExpressionType</code>. * @param pTokenRewriteStream The token stream the token of the stated * tree node belongs to. * * @throws ArgumentException if the given tree doesn't represent or * represents an unsupported expression * type. */ protected AST2Expression( AST2JSOMTree pTree, ExpressionType pExpressionType, TokenRewriteStream pTokenRewriteStream) : base(pTree, JSOMType.EXPRESSION, pTokenRewriteStream) { mExpressionType = pExpressionType; }
/** * Tells if <code>this</code> is represents an expression of the stated * type. * * @param pType One of the <code>ExpressionType.???</code> constants * defined by the interface <code>Expression</code>. * * @return <code>true</code> if <code>this</code> is an expression of the * stated type. */ public bool isExpressionType(ExpressionType pType) { return mExpressionType == pType; }