Class: Mutest::AST::Regexp::Transformer::Quantifier::ASTToExpression Private

Inherits:
ASTToExpression
  • Object
show all
Includes:
NamedChildren
Defined in:
lib/mutest/ast/regexp/transformer/quantifier.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`

Defined Under Namespace

Classes: Interval

Constant Summary collapse

Quantifier =

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.

Class.new.include(Concord::Public.new(:type, :suffix, :mode))
QUANTIFIER_MAP =

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.

IceNine.deep_freeze({
  regexp_greedy_zero_or_more:     [:zero_or_more, '*',  :greedy],
  regexp_greedy_one_or_more:      [:one_or_more,  '+',  :greedy],
  regexp_greedy_zero_or_one:      [:zero_or_one,  '?',  :greedy],
  regexp_possessive_zero_or_one:  [:zero_or_one,  '?+', :possessive],
  regexp_reluctant_zero_or_more:  [:zero_or_more, '*?', :reluctant],
  regexp_reluctant_one_or_more:   [:one_or_more,  '+?', :reluctant],
  regexp_possessive_zero_or_more: [:zero_or_more, '*+', :possessive],
  regexp_possessive_one_or_more:  [:one_or_more,  '++', :possessive],
  regexp_greedy_interval:         [:interval,     '',   :greedy],
  regexp_reluctant_interval:      [:interval,     '?',  :reluctant],
  regexp_possessive_interval:     [:interval,     '+',  :possessive]
}.map { |ast_type, arguments| [ast_type, Quantifier.new(*arguments)] }.to_h)

Method Summary

Methods included from NamedChildren

included

Methods inherited from ASTToExpression

#call