Sha256: 331e40369b69e913f0d3ced1361b194164ea1bbfb6dd1c139a79651c6752c2f8

Contents?: true

Size: 412 Bytes

Versions: 3

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
lrama-0.7.0 lib/lrama/grammar/reference.rb
lrama-0.6.11 lib/lrama/grammar/reference.rb
lrama-0.6.10 lib/lrama/grammar/reference.rb