Package org.jruby.ast

Examples of org.jruby.ast.ArgsNoArgNode


    public Node new_args(ISourcePosition position, ListNode pre, ListNode optional, RestArgNode rest,
            ListNode post, BlockArgNode block) {
        // Zero-Argument declaration
        if (optional == null && rest == null && post == null && block == null) {
            if (pre == null || pre.size() == 0) return new ArgsNoArgNode(position);
            if (pre.size() == 1 && !hasAssignableArgs(pre)) return new ArgsPreOneArgNode(position, pre);
            if (pre.size() == 2 && !hasAssignableArgs(pre)) return new ArgsPreTwoArgNode(position, pre);
        }
        return new ArgsNode(position, pre, optional, rest, post, block);
    }
View Full Code Here


    public static void defineAttrReader(Graph graph, String name) {
        ISourcePosition pos = new SimpleSourcePosition("(generated)", 0);
        graph.createVertex(new DefnNode(pos,
                                        new ArgumentNode(pos, name),
                                        new ArgsNoArgNode(pos),
                                        new LocalStaticScope(null),
                                        new InstVarNode(pos, "@" + name)));
    }
View Full Code Here

TOP

Related Classes of org.jruby.ast.ArgsNoArgNode

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.