Class: Node::DREGX
- Defined in:
- ext/internal/node/nodeinfo.c,
ext/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c
Overview
Represents a regular expresion with interpolation. The node is evaluated by duplicating the regex stored in the ‘lit’ element, then iterating over the nodes stored in the ‘next’ element. Each node found should evaluate to a string, and each resulting string is appended onto the original string. Interpolation is represented with the EVSTR node.
Class Method Summary collapse
-
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
Instance Method Summary collapse
-
#cflag ⇒ Object
Return the Node’s cflag member.
-
#lit ⇒ Object
Return the Node’s lit member.
-
#next ⇒ Object
Return the Node’s next member.
Methods inherited from Node
#[], #_dump, _load, #address, #bytecode_compile, compile_string, #eval, #flags, #inspect, #members, #nd_file, #nd_line, #nd_type, #obfusc, #pretty_print, #swap, #to_a, #tree, type
Class Method Details
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
2793 2794 2795 2796 |
# File 'ext/internal/node/nodeinfo.c', line 2793 VALUE node_s_members(VALUE klass) { return rb_iv_get(klass, "__member__"); } |
Instance Method Details
#cflag ⇒ Object
Return the Node’s cflag member. The return type is an Integer.
2103 2104 2105 2106 2107 2108 |
# File 'ext/internal/node/nodeinfo.c', line 2103 static VALUE node_cflag(VALUE self) { NODE * n; Data_Get_Struct(self, NODE, n); return LONG2NUM(n->nd_cflag); } |
#lit ⇒ Object
Return the Node’s lit member. The return type is either a Node or an Object.
2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 |
# File 'ext/internal/node/nodeinfo.c', line 2389 static VALUE node_lit(VALUE self) { NODE * n; Data_Get_Struct(self, NODE, n); if(TYPE(n->nd_lit) == T_NODE) { if(0 && nd_type(n) == NODE_OP_ASGN2) { return wrap_node_as( (NODE *)n->nd_lit, rb_cNodeSubclass[NODE_OP_ASGN2_ARG]); } else { return wrap_node((NODE *)n->nd_lit); } } else { return (VALUE)n->nd_lit; } } |
#next ⇒ Object
Return the Node’s next member. The return type is either a Node or an Object.
2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
# File 'ext/internal/node/nodeinfo.c', line 2437 static VALUE node_next(VALUE self) { NODE * n; Data_Get_Struct(self, NODE, n); if(TYPE(n->nd_next) == T_NODE) { if(1 && nd_type(n) == NODE_OP_ASGN2) { return wrap_node_as( (NODE *)n->nd_next, rb_cNodeSubclass[NODE_OP_ASGN2_ARG]); } else { return wrap_node((NODE *)n->nd_next); } } else { return (VALUE)n->nd_next; } } |