123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Support::Source::ExpressionSequenceNode Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Node
Instance Chain:
self, Node, Enumerable
Inherits: RSpec::Support::Source::Node
Defined in: rspec-support/lib/rspec/support/source/node.rb

Overview

Basically ‘Ripper.sexp` generates arrays whose first element is a symbol (type of sexp), but it exceptionally generates typeless arrays for expression sequence:

Ripper.sexp(‘foo; bar’)

> [

  :program,
  [ # Typeless array
    [:vcall, [:@ident, "foo", [1, 0]]],
    [:vcall, [:@ident, "bar", [1, 5]]]
  ]
]

We wrap typeless arrays in this pseudo type node so that it can be handled in the same way as other type node.

Class Method Summary

Node - Inherited

Instance Attribute Summary

Node - Inherited

Instance Method Summary

Node - Inherited

#args, #children,
#each

We use a loop here (instead of recursion) to prevent SystemStackError.

#each_ancestor, #inspect, #location, #type, #raw_args

Instance Method Details

#raw_args (private)

[ GitHub ]

  
# File 'rspec-support/lib/rspec/support/source/node.rb', line 106

def raw_args
  sexp
end

#type

[ GitHub ]

  
# File 'rspec-support/lib/rspec/support/source/node.rb', line 100

def type
  :_expression_sequence
end