Class: Lrama::Precedence

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/lrama/grammar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#precedenceObject

Returns the value of attribute precedence

Returns:

  • (Object)

    the current value of precedence



260
261
262
# File 'lib/lrama/grammar.rb', line 260

def precedence
  @precedence
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



260
261
262
# File 'lib/lrama/grammar.rb', line 260

def type
  @type
end

Instance Method Details

#<=>(other) ⇒ Object



263
264
265
# File 'lib/lrama/grammar.rb', line 263

def <=>(other)
  self.precedence <=> other.precedence
end