123456789_123456789_123456789_123456789_123456789_

Class: Prism::RipperCompat::SexpBuilderPP

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Prism::RipperCompat::SexpBuilder
Defined in: lib/prism/ripper_compat.rb

Overview

This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that returns the same values as ::Ripper::SexpBuilder except with a couple of niceties that flatten linked lists into arrays.

Class Method Summary

::Prism::RipperCompat - Inherited

.new

Create a new ::Prism::RipperCompat object with the given source.

.sexp

This is a convenience method that runs the SexpBuilderPP subclass parser.

.sexp_raw

This is a convenience method that runs the SexpBuilder subclass parser.

Instance Attribute Summary

::Prism::RipperCompat - Inherited

#column

The current column number of the parser.

#error?

True if the parser encountered an error during parsing.

#lineno

The current line number of the parser.

#source

The source that is being parsed.

Instance Method Summary

::Prism::RipperCompat - Inherited

#parse

Parse the source and return the result.

#visit_call_node

Visit a CallNode node.

#visit_float_node

Visit a ::Prism::FloatNode node.

#visit_imaginary_node
#visit_integer_node

Visit an ::Prism::IntegerNode node.

#visit_program_node

Visit a ProgramNode node.

#visit_rational_node

Visit a ::Prism::RationalNode node.

#visit_statements_node

Visit a StatementsNode node.

#bounds

This method is responsible for updating lineno and column information to reflect the current node.

#on_magic_comment

Alias for #_dispatch2.

#on_parse_error

Alias for #_dispatch1.

#result

Lazily initialize the parse result.

#_dispatch0, #_dispatch1, #_dispatch2, #_dispatch3, #_dispatch4, #_dispatch5, #_dispatch7

Constructor Details

This class inherits a constructor from Prism::RipperCompat

Instance Method Details

#_dispatch_event_new (private)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/prism/ripper_compat.rb', line 45

def _dispatch_event_new # :nodoc:
  []
end

#_dispatch_event_push(list, item) (private)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/prism/ripper_compat.rb', line 49

def _dispatch_event_push(list, item) # :nodoc:
  list << item
  list
end