Class: Mutant::AST::Pattern::Lexer Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/ast/pattern/lexer.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.

rubocop:disable Metrics/ClassLength

Defined Under Namespace

Classes: Error

Constant Summary collapse

WHITESPACE =

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.

[' ', "\t", "\n"].to_set.freeze
STRING_PATTERN =

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.

/\A[a-zA-Z][_a-zA-Z0-9]*\z/
SINGLE_CHAR =

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.

{
  '(' => :group_start,
  ')' => :group_end,
  ',' => :delimiter,
  '=' => :eq,
  '{' => :properties_start,
  '}' => :properties_end
}.freeze

Class Method Summary collapse

Class Method Details

.call(string) ⇒ Object

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



21
22
23
# File 'lib/mutant/ast/pattern/lexer.rb', line 21

def self.call(string)
  new(string).__send__(:run)
end