internal TRY_BLOCK(Scope parent_scope, Node body, Node rescue, Node _else, Node ensure, YYLTYPE location) : base(location) { this.parent_scope = parent_scope; this.body = body; this.rescue = (RESCUE_CLAUSE)rescue; this._else = _else; this.ensure = ensure; }
internal ControlFlowNode(Scope parent_scope, ARGS return_val, YYLTYPE location) : base(location) { this.parent_scope = parent_scope; // no return value if (return_val == null) return; if (return_val.block != null) throw new System.Exception("block argument should not be given"); // just a single value => return that value if (return_val.hashlist == null && return_val.array == null && return_val.parameters.nd_next == null) { this.return_val = return_val.parameters; return; } // just hash values => return a HASH if (return_val.parameters == null && return_val.array == null) { this.return_val = new HASH(return_val.hashlist, return_val.location); return; } // return *p => if p is an ARRAY then ... else ... if (return_val.parameters == null && return_val.hashlist == null) { this.array = return_val.array; this.return_val = new ProxyNode(ReturnArray, return_val.location); } else { this.args = return_val; this.return_val = new ProxyNode(ReturnRubyArray, return_val.location); } }
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; }
internal RESCUE_CLAUSE(Scope parent_scope, Node body, YYLTYPE location) : base(location) { this.parent_scope = parent_scope; this.body = body; }
// return return_val; internal RETURN(Scope current, Node return_val, YYLTYPE location) : base(current, (ARGS)return_val, location) { }
// retry internal RETRY(Scope current, YYLTYPE location): base(current, location) { }
protected Node return_val; // optional internal ControlFlowNode(Scope parent_scope, YYLTYPE location) : base(location) { this.parent_scope = parent_scope; }