class Antlr4::Runtime::RangeTransition

Attributes

from[R]
to[R]

Public Class Methods

new(target, from, to) click to toggle source
Calls superclass method
# File lib/antlr4/runtime/range_transition.rb, line 7
def initialize(target, from, to)
  super(target)
  @from = from
  @to = to
end

Public Instance Methods

label() click to toggle source
# File lib/antlr4/runtime/range_transition.rb, line 17
def label
  IntervalSet.of(@from, @to)
end
matches(symbol, _min_vocab_symbol, _max_vocab_symbol) click to toggle source
# File lib/antlr4/runtime/range_transition.rb, line 21
def matches(symbol, _min_vocab_symbol, _max_vocab_symbol)
  symbol >= @from && symbol <= @to
end
serialization_type() click to toggle source
# File lib/antlr4/runtime/range_transition.rb, line 13
def serialization_type
  RANGE
end
to_s() click to toggle source
# File lib/antlr4/runtime/range_transition.rb, line 25
def to_s
  "'" << @from << "'..'" << @to << "'"
end