Sha256: 781929b364ce6991c7acba5f2999bb3fe9e86c8faee4bada7b095093d9f726b5

Contents?: true

Size: 484 Bytes

Versions: 9

Compression:

Stored size: 484 Bytes

Contents

module Lrama
  class Lexer
    class Token
      class InstantiateRule < Token
        attr_reader :args, :lhs_tag

        def initialize(s_value:, alias_name: nil, location: nil, args: [], lhs_tag: nil)
          super s_value: s_value, alias_name: alias_name, location: location
          @args = args
          @lhs_tag = lhs_tag
        end

        def rule_name
          s_value
        end

        def args_count
          args.count
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lrama-0.6.9 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.8 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.7 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.6 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.5 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.4 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.3 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.2 lib/lrama/lexer/token/instantiate_rule.rb
lrama-0.6.1 lib/lrama/lexer/token/instantiate_rule.rb