Package org.jruby.truffle.runtime

Examples of org.jruby.truffle.runtime.LexicalScope


            return elseNode;
        }
    }

    private RubyNode openModule(SourceSection sourceSection, RubyNode defineOrGetNode, String name, Node bodyNode) {
        LexicalScope newLexicalScope = environment.pushLexicalScope();
        try {
            final SharedMethodInfo sharedMethodInfo = new SharedMethodInfo(sourceSection, newLexicalScope, name, false, bodyNode);

            final TranslatorEnvironment newEnvironment = new TranslatorEnvironment(context, environment, environment.getParser(),
                    environment.getParser().allocateReturnID(), true, true, sharedMethodInfo, name, false);
View Full Code Here


    @Override
    public RubyNode visitConstNode(org.jruby.ast.ConstNode node) {
        // Unqualified constant access, as in CONST
        final SourceSection sourceSection = translate(node.getPosition());

        final LexicalScope lexicalScope = environment.getLexicalScope();
        final RubyNode moduleNode = new LexicalScopeNode(context, sourceSection, lexicalScope);

        return new ReadConstantNode(context, sourceSection, node.getName(), moduleNode, lexicalScope);
    }
View Full Code Here

    public LexicalScope getLexicalScope() {
        return lexicalScope;
    }

    public LexicalScope pushLexicalScope() {
        return lexicalScope = new LexicalScope(lexicalScope);
    }
View Full Code Here

TOP

Related Classes of org.jruby.truffle.runtime.LexicalScope

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.