01 /**
02 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03 */
04 package net.sourceforge.pmd.lang.ecmascript.ast;
05
06 import org.mozilla.javascript.ast.AstRoot;
07 import org.mozilla.javascript.ast.UnaryExpression;
08
09 public class ASTUnaryExpression extends AbstractEcmascriptNode<UnaryExpression> {
10 public ASTUnaryExpression(UnaryExpression unaryExpression) {
11 super(unaryExpression);
12 super.setImage(AstRoot.operatorToString(unaryExpression.getOperator()));
13 }
14
15 /**
16 * Accept the visitor.
17 */
18 public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) {
19 return visitor.visit(this, data);
20 }
21
22 public boolean isPrefix() {
23 return node.isPrefix();
24 }
25
26 public boolean isPostfix() {
27 return node.isPostfix();
28 }
29 }
|