Adding support for unary "void" operator.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4447 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2012-02-08 15:34:10 +00:00
parent 6e1d5783e6
commit a52455972c
1 changed files with 3 additions and 5 deletions

View File

@ -1257,11 +1257,8 @@ public class RhinoToAstTranslator {
} else if (node.getType() == Token.TYPEOFNAME) {
return Ast.makeNode(CAstNode.TYPE_OF, Ast.makeNode(CAstNode.VAR, Ast.makeConstant(node.getString())));
}
else if (node.getType() == Token.TYPEOF) {
} else if (node.getType() == Token.TYPEOF) {
return Ast.makeNode(CAstNode.TYPE_OF, visit(node.getOperand(), arg));
} else if (node.getType() == Token.DELPROP) {
AstNode expr = node.getOperand();
if (expr instanceof FunctionCall) {
@ -1270,7 +1267,8 @@ public class RhinoToAstTranslator {
}
return Ast.makeNode(CAstNode.ASSIGN, visit(expr, arg), Ast.makeConstant(null));
} else if (node.getType() == Token.VOID) {
return Ast.makeConstant(null);
} else {
return Ast.makeNode(CAstNode.UNARY_EXPR, translateOpcode(node.getOperator()), visit(node.getOperand(), arg));
}