Ejemplo n.º 1
0
        internal override void Init(YYLTYPE location, params object[] input)
        {
            this.location = location;
            this.args = (LVALUE)input[0];
            body = (Node)input[1];

            Node list = this.args;

            if (list == null)
                arity = -1;
            else
            {
                arity = 0;

                if (list is MLHS)
                    list = ((MLHS)list).elements;

                while (list != null)
                {
                    arity++;

                    if (list is LHS_STAR)
                        arity = -arity;

                    list = (LVALUE)list.nd_next;
                }
            }
        }
Ejemplo n.º 2
0
        internal RESCUE_CLAUSE(Scope parent_scope, Node types, LVALUE var, Node body, Node next, YYLTYPE location)
            : base(location)
        {
            if (types == null)
                types = new CONST(parent_scope, ID.intern("StandardError"), location);

            this.parent_scope = parent_scope;
            this.types = types;
            this.var = var;
            this.body = body;
            this.next = (RESCUE_CLAUSE)next;
        }
Ejemplo n.º 3
0
        internal LVALUE elements;    // optional

        internal MLHS(LVALUE elements, YYLTYPE location): base(location)
        {
            this.elements = elements;
        }
Ejemplo n.º 4
0
 internal ASSIGNMENT(LVALUE lhs, Node rhs, YYLTYPE location)
     : base(location)
 {
     this.lhs = lhs;
     this.rhs = rhs;
 }
Ejemplo n.º 5
0
 internal OP_ASGN(LVALUE lhs, string op, Node rhs, YYLTYPE location)
     : base(lhs, rhs, location)
 {
     this.op = op;
 }
Ejemplo n.º 6
0
 internal LHS_STAR(LVALUE arrayParam, YYLTYPE location): base(location)
 {
     if (arrayParam == null)
         this.arrayParam = new DummyParam(location);
     else
         this.arrayParam = arrayParam;
 }