@Override protected BinaryOperatorAsNode copy() { return new BinaryOperatorAsNode(this); }
@Override public ITypeDefinition resolveType(ICompilerProject project) { // The old compiler just says the type of 'a as B' is *. // We do better and say it is B if B is a type. IDefinition rightType = getRightOperandNode().resolve(project); if (rightType instanceof ITypeDefinition) return (ITypeDefinition)rightType; return project.getBuiltinType(BuiltinType.ANY_TYPE); }
else if (left instanceof BinaryOperatorAsNode) left = (IExpressionNode)((BinaryOperatorAsNode)left).getChild(0); if (left instanceof MemberAccessExpressionNode) s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)left);
else if (left instanceof BinaryOperatorAsNode) left = (IExpressionNode)((BinaryOperatorAsNode)left).getChild(0); if (left instanceof MemberAccessExpressionNode) s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)left);
String fname = ((IdentifierNode)boan.getChild(1)).getName(); if (fname.equals("XML") || fname.equals("XMLList")) return true;
@Override protected BinaryOperatorAsNode copy() { return new BinaryOperatorAsNode(this); }
@Override public ITypeDefinition resolveType(ICompilerProject project) { // The old compiler just says the type of 'a as B' is *. // We do better and say it is B if B is a type. IDefinition rightType = getRightOperandNode().resolve(project); if (rightType instanceof ITypeDefinition) return (ITypeDefinition)rightType; return project.getBuiltinType(BuiltinType.ANY_TYPE); }
return new BinaryOperatorAsNode(operatorToken, leftOperand, rightOperand);
return new BinaryOperatorAsNode(operatorToken, leftOperand, rightOperand);