Class: Pegarus::CharacterRange

Inherits:
Pattern
  • Object
show all
Defined in:
lib/pegarus/ast/character_range.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pattern

#*, #+, #+@, #-, #-@, #/, engine, #graph, #match, select_engine

Constructor Details

#initialize(range) ⇒ CharacterRange

Returns a new instance of CharacterRange.



5
6
7
# File 'lib/pegarus/ast/character_range.rb', line 5

def initialize(range)
  @range = range
end

Instance Attribute Details

#rangeObject

Returns the value of attribute range.



3
4
5
# File 'lib/pegarus/ast/character_range.rb', line 3

def range
  @range
end

Instance Method Details

#visit(visitor) ⇒ Object



9
10
11
# File 'lib/pegarus/ast/character_range.rb', line 9

def visit(visitor)
  visitor.character_range self
end