Class: Racc::Prec

Inherits:
Object show all
Defined in:
lib/racc/grammar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol, lineno) ⇒ Prec

Returns a new instance of Prec.



788
789
790
791
# File 'lib/racc/grammar.rb', line 788

def initialize(symbol, lineno)
  @symbol = symbol
  @lineno = lineno
end

Instance Attribute Details

#linenoObject (readonly)

Returns the value of attribute lineno.



800
801
802
# File 'lib/racc/grammar.rb', line 800

def lineno
  @lineno
end

#symbolObject (readonly)

Returns the value of attribute symbol.



799
800
801
# File 'lib/racc/grammar.rb', line 799

def symbol
  @symbol
end

Instance Method Details

#nameObject Also known as: inspect



793
794
795
# File 'lib/racc/grammar.rb', line 793

def name
  "=#{@symbol}"
end