Class: RSpec::Support::Source::ExpressionSequenceNode
- Defined in:
- 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.
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#args, #children, #each, #each_ancestor, #initialize, #inspect, #location, sexp?
Constructor Details
This class inherits a constructor from RSpec::Support::Source::Node
Instance Method Details
#type ⇒ Object
100 101 102 |
# File 'lib/rspec/support/source/node.rb', line 100 def type :_expression_sequence end |