Class: SyntaxTree::Parser::Semicolon

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/parser.rb

Overview

Semicolons are tokens that get added to the token list but never get attached to the AST. Because of this they only need to track their associated location so they can be used for computing bounds.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ Semicolon

Returns a new instance of Semicolon.



3374
3375
3376
# File 'lib/syntax_tree/parser.rb', line 3374

def initialize(location)
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



3372
3373
3374
# File 'lib/syntax_tree/parser.rb', line 3372

def location
  @location
end