Class: Aurum::Grammar::LexicalRules::Point

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#charObject

Returns the value of attribute char

Returns:

  • (Object)

    the current value of char



206
207
208
# File 'lib/aurum/grammar/lexical_rules.rb', line 206

def char
  @char
end

#destinationObject

Returns the value of attribute destination

Returns:

  • (Object)

    the current value of destination



206
207
208
# File 'lib/aurum/grammar/lexical_rules.rb', line 206

def destination
  @destination
end

#is_startObject

Returns the value of attribute is_start

Returns:

  • (Object)

    the current value of is_start



206
207
208
# File 'lib/aurum/grammar/lexical_rules.rb', line 206

def is_start
  @is_start
end

Instance Method Details

#<=>(other) ⇒ Object



208
209
210
# File 'lib/aurum/grammar/lexical_rules.rb', line 208

def <=> other
  char == other.char ? (is_start ? (other.is_start ? 0 : -1) : (other.is_start ? 1 : 0)) : (char <=> other.char)
end