Class: Opencdd::Cddal::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



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

def column
  @column
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



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

def kind
  @kind
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



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

def line
  @line
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



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

def value
  @value
end

Instance Method Details

#inspectObject



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

def inspect
  "#{kind}#{value && !value.empty? ? "(#{value.inspect})" : ""}@#{line}:#{column}"
end