Examples of InstAsgnNode


Examples of org.jruby.ast.InstAsgnNode

        context.performBooleanBranch(trueCallback, falseCallback);
    }

    public void compileInstAsgn(Node node, BodyCompiler context) {
        final InstAsgnNode instAsgnNode = (InstAsgnNode) node;

        CompilerCallback value = new CompilerCallback() {
            public void call(BodyCompiler context) {
                compile(instAsgnNode.getValueNode(), context);
            }
        };

        context.assignInstanceVariable(instAsgnNode.getName(), value);
    }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

        context.assignInstanceVariable(instAsgnNode.getName(), value);
    }

    public void compileInstAsgnAssignment(Node node, BodyCompiler context) {
        InstAsgnNode instAsgnNode = (InstAsgnNode) node;
        context.assignInstanceVariable(instAsgnNode.getName());
    }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

                if (isInDef() || isInSingle()) {
                    throw new SyntaxException(PID.DYNAMIC_CONSTANT_ASSIGNMENT, lhs.getPosition(), "dynamic constant assignment");
                }
                return new ConstDeclNode(lhs.getPosition(), (String) lhs.getValue(), null, value);
            case Tokens.tIVAR:
                return new InstAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tCVAR:
                if (isInDef() || isInSingle()) {
                    return new ClassVarAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
                }
                return new ClassVarDeclNode(lhs.getPosition(), (String) lhs.getValue(), value);
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

            context.performBooleanBranch(trueCallback, falseCallback);
        }
    }

    public void compileInstAsgn(Node node, BodyCompiler context, boolean expr) {
        final InstAsgnNode instAsgnNode = (InstAsgnNode) node;

        CompilerCallback value = new CompilerCallback() {
            public void call(BodyCompiler context) {
                compile(instAsgnNode.getValueNode(), context, true);
            }
        };

        context.assignInstanceVariable(instAsgnNode.getName(), value);
        // TODO: don't require pop
        if (!expr) context.consumeCurrentValue();
    }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

        // TODO: don't require pop
        if (!expr) context.consumeCurrentValue();
    }

    public void compileInstAsgnAssignment(Node node, BodyCompiler context, boolean expr) {
        InstAsgnNode instAsgnNode = (InstAsgnNode) node;
        context.assignInstanceVariable(instAsgnNode.getName());
        // TODO: don't require pop
        if (!expr) context.consumeCurrentValue();
    }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

                    throw new SyntaxException(PID.DYNAMIC_CONSTANT_ASSIGNMENT, lhs.getPosition(),
                            lexer.getCurrentLine(), "dynamic constant assignment");
                }
                return new ConstDeclNode(lhs.getPosition(), (String) lhs.getValue(), null, value);
            case Tokens.tIVAR:
                return new InstAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tCVAR:
                return new ClassVarAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tGVAR:
                return new GlobalAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
        }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

                    throw new SyntaxException(PID.DYNAMIC_CONSTANT_ASSIGNMENT, lhs.getPosition(),
                            lexer.getCurrentLine(), "dynamic constant assignment");
                }
                return new ConstDeclNode(lhs.getPosition(), (String) lhs.getValue(), null, value);
            case Tokens.tIVAR:
                return new InstAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tCVAR:
                if (isInDef() || isInSingle()) {
                    return new ClassVarAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
                }
                return new ClassVarDeclNode(lhs.getPosition(), (String) lhs.getValue(), value);
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

                    throw new SyntaxException(PID.DYNAMIC_CONSTANT_ASSIGNMENT, lhs.getPosition(),
                            lexer.getCurrentLine(), "dynamic constant assignment");
                }
                return new ConstDeclNode(lhs.getPosition(), (String) lhs.getValue(), null, value);
            case Tokens.tIVAR:
                return new InstAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tCVAR:
                return new ClassVarAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
            case Tokens.tGVAR:
                return new GlobalAsgnNode(lhs.getPosition(), (String) lhs.getValue(), value);
        }
View Full Code Here

Examples of org.jruby.ast.InstAsgnNode

        ISourcePosition pos = new SimpleSourcePosition("(generated)", 0);
        graph.createVertex(new DefnNode(pos,
                                        new ArgumentNode(pos, name + "="),
                                        new ArgsPreOneArgNode(pos, new ListNode(null, new ArgumentNode(null, name))),
                                        new LocalStaticScope(null),
                                        new InstAsgnNode(pos, "@" + name, new LocalVarNode(null, 0, name))));
    }
View Full Code Here

Examples of org.jrubyparser.ast.InstAsgnNode

    if(nodes.isEmpty())
      // No block when there's just one assignment
      nodes = RubyParserUtils.findNodes(iterNode, new NodeType[] { NodeType.INSTASGNNODE });

    for(Node node : nodes) {
      InstAsgnNode asgnNode = (InstAsgnNode) node;
      if(!"@doc".equals(asgnNode.getName()))
        continue;

      Node valueNode = asgnNode.getValue();
      if(valueNode instanceof StrNode)
        type.setDocumentation(((StrNode) valueNode).getValue());
      break;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.