Class: Rubinius::ToolSet.current::TS::AST::RangeExclude
- Defined in:
- lib/rubinius/ast/literals.rb
Instance Attribute Summary
Attributes inherited from Range
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, start, finish) ⇒ RangeExclude
constructor
A new instance of RangeExclude.
- #to_sexp ⇒ Object
Methods inherited from Range
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, start, finish) ⇒ RangeExclude
Returns a new instance of RangeExclude.
268 269 270 271 272 |
# File 'lib/rubinius/ast/literals.rb', line 268 def initialize(line, start, finish) @line = line @start = start @finish = finish end |
Instance Method Details
#bytecode(g) ⇒ Object
274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/rubinius/ast/literals.rb', line 274 def bytecode(g) pos(g) g.push_cpath_top g.find_const :Range g.send :allocate, 0, true g.dup @start.bytecode(g) @finish.bytecode(g) g.push :true g.send :initialize, 3, true g.pop end |
#to_sexp ⇒ Object
288 289 290 |
# File 'lib/rubinius/ast/literals.rb', line 288 def to_sexp [:dot3, @start.to_sexp, @finish.to_sexp] end |