Exception: SyntaxTree::Parser::ParseError

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

Overview

A special parser error so that we can get nice syntax displays on the error message when prettier prints out the results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, lineno, column) ⇒ ParseError

Returns a new instance of ParseError.



10
11
12
13
14
# File 'lib/syntax_tree/parser.rb', line 10

def initialize(error, lineno, column)
  super(error)
  @lineno = lineno
  @column = column
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



8
9
10
# File 'lib/syntax_tree/parser.rb', line 8

def column
  @column
end

#linenoObject (readonly)

Returns the value of attribute lineno.



8
9
10
# File 'lib/syntax_tree/parser.rb', line 8

def lineno
  @lineno
end