Exception: Flor::ParseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_array, fname) ⇒ ParseError

Returns a new instance of ParseError.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/flor/parser.rb', line 27

def initialize(error_array, fname)

#puts "-" * 80; p error_array; puts error_array.last; puts "-" * 80
  @line, @column, @offset, @msg, @visual = error_array
  @fname = fname

  m = "syntax error at line #{@line} column #{@column}"
  m += " in #{fname}" if fname

  super(m)
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



25
26
27
# File 'lib/flor/parser.rb', line 25

def column
  @column
end

#fnameObject (readonly)

Returns the value of attribute fname.



25
26
27
# File 'lib/flor/parser.rb', line 25

def fname
  @fname
end

#lineObject (readonly)

Returns the value of attribute line.



25
26
27
# File 'lib/flor/parser.rb', line 25

def line
  @line
end

#msgObject (readonly)

Returns the value of attribute msg.



25
26
27
# File 'lib/flor/parser.rb', line 25

def msg
  @msg
end

#offsetObject (readonly)

Returns the value of attribute offset.



25
26
27
# File 'lib/flor/parser.rb', line 25

def offset
  @offset
end

#visualObject (readonly)

Returns the value of attribute visual.



25
26
27
# File 'lib/flor/parser.rb', line 25

def visual
  @visual
end