Package org.jruby.ast

Examples of org.jruby.ast.VAliasNode


        context.pollThreadEvents();
    }

    public void compileVAlias(Node node, BodyCompiler context) {
        VAliasNode valiasNode = (VAliasNode) node;

        context.aliasGlobal(valiasNode.getNewName(), valiasNode.getOldName());
    }
View Full Code Here


              }
  break;
case 11:
          // line 316 "DefaultRubyParser.y"
  {
                  yyVal = new VAliasNode(getPosition(((Token)yyVals[-2+yyTop])), (String) ((Token)yyVals[-1+yyTop]).getValue(), (String) ((Token)yyVals[0+yyTop]).getValue());
              }
  break;
case 12:
          // line 319 "DefaultRubyParser.y"
  {
                  yyVal = new VAliasNode(getPosition(((Token)yyVals[-2+yyTop])), (String) ((Token)yyVals[-1+yyTop]).getValue(), "$" + ((BackRefNode)yyVals[0+yyTop]).getType()); /* XXX*/
              }
  break;
case 13:
          // line 322 "DefaultRubyParser.y"
  {
View Full Code Here

            if (!expr) context.consumeCurrentValue();
        }
    }

    public void compileVAlias(Node node, BodyCompiler context, boolean expr) {
        VAliasNode valiasNode = (VAliasNode) node;

        context.aliasGlobal(valiasNode.getNewName(), valiasNode.getOldName());
        // TODO: don't require pop
        if (!expr) context.consumeCurrentValue();
    }
View Full Code Here

    }

    // SSS FIXME: Got a little lazy?  We could/should define a special instruction ALIAS_GLOBAL_VAR_Instr probably
    // Is this a ruby-internals or a jruby-internals call?
    public Operand buildVAlias(Node node, IRScope m) {
        VAliasNode valiasNode = (VAliasNode) node;
        Operand[] args = new Operand[] { new StringLiteral(valiasNode.getOldName()) };
        m.addInstr(new RubyInternalCallInstr(null, MethAddr.GVAR_ALIAS, new StringLiteral(valiasNode.getNewName()), args));
        return Nil.NIL;
    }
View Full Code Here

TOP

Related Classes of org.jruby.ast.VAliasNode

Copyright © 2018 www.massapicom. 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.