private void pushIntegralType(GeneratorAdapter ga, Node node, IntegralType integralType) { if (node is IntegralTypeNode) { IntegralTypeNode integralTypeNode = ((IntegralTypeNode)node); switch (integralType) { case com.juliar.nodes.IntegralType.jdouble: // ga.push(Double.parseDouble(integralTypeNode.getIntegralValue())); break; case com.juliar.nodes.IntegralType.jfloat: // ga.push(Float.parseFloat(integralTypeNode.getIntegralValue())); break; case com.juliar.nodes.IntegralType.jinteger: // ga.push(Integer.parseInt(integralTypeNode.getIntegralValue())); break; case com.juliar.nodes.IntegralType.jlong: // ga.push(Long.parseLong(integralTypeNode.getIntegralValue())); break; default: break; } } }
public override Node visitTypes(JuliarParser.TypesContext ctx) { IntegralTypeNode integralTypeNode = new IntegralTypeNode(); IterateOverContext context = new IterateOverContext(this); context.iterateOverChildren(ctx.primitiveTypes(), this, integralTypeNode); return(integralTypeNode); }
private void integralTypeNode(IntegralTypeNode itn) { ActivationFrame frame = activationFrameStack.peek(); frame.operandStack.Push(itn); }