Sha256: d04f560a7c5973308c841d4739b87ecf2bcbc8d7977d5200fd51e874c8d83490

Contents?: true

Size: 445 Bytes

Versions: 14

Compression:

Stored size: 445 Bytes

Contents

module Antlr4::Runtime

  class SetTransition < Transition
    attr_reader :set

    def initialize(target, set)
      super(target)
      set = IntervalSet.of(Token::INVALID_TYPE) if set.nil?

      @set = set
    end

    def serialization_type
      SET
    end

    def label
      @set
    end

    def matches(symbol, _min_vocab_symbol, _max_vocab_symbol)
      @set.contains(symbol)
    end

    def to_s
      @set.to_s
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
antlr4-runtime-0.2.12 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.11 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.10 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.9 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.8 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.7 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.6 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.5 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.4 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.3 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.2 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.1 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.2.0 lib/antlr4/runtime/set_transition.rb
antlr4-runtime-0.1.0 lib/antlr4/runtime/set_transition.rb