Class: Parselly::Lexer::Identifier

Inherits:
Struct
  • Object
show all
Defined in:
lib/parselly/lexer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#positionObject

Returns the value of attribute position.



8
9
10
# File 'lib/parselly/lexer.rb', line 8

def position
  @position
end

#rawObject

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



7
8
9
# File 'lib/parselly/lexer.rb', line 7

def raw
  @raw
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



7
8
9
# File 'lib/parselly/lexer.rb', line 7

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
# File 'lib/parselly/lexer.rb', line 14

def ==(other)
  other.respond_to?(:value) ? value == other.value : value == other
end

#to_sObject



10
11
12
# File 'lib/parselly/lexer.rb', line 10

def to_s
  value
end