123456789_123456789_123456789_123456789_123456789_

Class: Prism::RipperCompat::SexpBuilder

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

Overview

This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that returns the arrays of [type, *children].

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