Class: Laser::LexicalAnalysis::Token

Inherits:
Struct
  • Object
show all
Defined in:
lib/laser/analysis/lexical_analysis.rb

Overview

This is a wrapper class around the tokens returned by Ripper. Since the tokens are just arrays, this class lets us use nice mnemonics with almost zero runtime overhead.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



9
10
11
# File 'lib/laser/analysis/lexical_analysis.rb', line 9

def body
  @body
end

#colObject

Returns the value of attribute col

Returns:

  • (Object)

    the current value of col



9
10
11
# File 'lib/laser/analysis/lexical_analysis.rb', line 9

def col
  @col
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



9
10
11
# File 'lib/laser/analysis/lexical_analysis.rb', line 9

def line
  @line
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/laser/analysis/lexical_analysis.rb', line 9

def type
  @type
end