Sha256: 982116a42cfb1c5701ae6373a56af350a65cdde3927ec2fd6f5e5a6882360b55

Contents?: true

Size: 381 Bytes

Versions: 7

Compression:

Stored size: 381 Bytes

Contents

module Lrama
  class Grammar
    # type: :dollar or :at
    # name: String (e.g. $$, $foo, $expr.right)
    # number: Integer (e.g. $1)
    # index: Integer
    # ex_tag: "$<tag>1" (Optional)
    class Reference < Struct.new(:type, :name, :number, :index, :ex_tag, :first_column, :last_column, keyword_init: true)
      def value
        name || number
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lrama-0.6.9 lib/lrama/grammar/reference.rb
lrama-0.6.8 lib/lrama/grammar/reference.rb
lrama-0.6.7 lib/lrama/grammar/reference.rb
lrama-0.6.6 lib/lrama/grammar/reference.rb
lrama-0.6.5 lib/lrama/grammar/reference.rb
lrama-0.6.4 lib/lrama/grammar/reference.rb
lrama-0.6.3 lib/lrama/grammar/reference.rb