Class: Mutant::AST::Regexp::Transformer::Recursive::ASTToExpression Private

Inherits:
ASTToExpression
  • Object
show all
Includes:
LookupTable
Defined in:
lib/mutant/ast/regexp/transformer/recursive.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Mapper from ‘Parser::AST::Node` to `Regexp::Expression`

Constant Summary collapse

TABLE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Expression::Sequence represents conditional branches, alternation branches, and intersection branches rubocop:disable Layout/LineLength

Table.create(
  [:regexp_alternation_meta,      [:meta,        :alternation,  '|'],    ::Regexp::Expression::Alternation],
  [:regexp_atomic_group,          [:group,       :atomic,       '(?>'],  ::Regexp::Expression::Group::Atomic],
  [:regexp_capture_group,         [:group,       :capture,      '('],    ::Regexp::Expression::Group::Capture],
  [:regexp_character_set,         [:set,         :character,    '['],    ::Regexp::Expression::CharacterSet],
  [:regexp_intersection_set,      [:set,         :intersection, '&&'],   ::Regexp::Expression::CharacterSet::Intersection],
  [:regexp_lookahead_assertion,   [:assertion,   :lookahead,    '(?='],  ::Regexp::Expression::Assertion::Lookahead],
  [:regexp_lookbehind_assertion,  [:assertion,   :lookbehind,   '(?<='], ::Regexp::Expression::Assertion::Lookbehind],
  [:regexp_nlookahead_assertion,  [:assertion,   :nlookahead,   '(?!'],  ::Regexp::Expression::Assertion::NegativeLookahead],
  [:regexp_nlookbehind_assertion, [:assertion,   :nlookbehind,  '(?<!'], ::Regexp::Expression::Assertion::NegativeLookbehind],
  [:regexp_open_conditional,      [:conditional, :open,         '(?'],   ::Regexp::Expression::Conditional::Expression],
  [:regexp_passive_group,         [:group,       :passive,      '(?:'],  ::Regexp::Expression::Group::Passive],
  [:regexp_range_set,             [:set,         :range,        '-'],    ::Regexp::Expression::CharacterSet::Range],
  [:regexp_sequence_expression,   [:expression,  :sequence,     ''],     ::Regexp::Expression::Sequence]
)

Constants included from LookupTable

LookupTable::Mapping

Method Summary

Methods inherited from ASTToExpression

#call

Methods included from Procto

included