Exception: RedParse::ParseError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- RedParse::ParseError
- Defined in:
- lib/redparse.rb,
lib/miniredparse.rb
Instance Attribute Summary collapse
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
Instance Method Summary collapse
-
#initialize(msg, stack) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(msg, stack) ⇒ ParseError
Returns a new instance of ParseError.
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/redparse.rb', line 644 def initialize(msg,stack) super(msg) @stack=stack if false ranges=(1..stack.size-2).map{|i| node=stack[i] if node.respond_to? :linerange node.linerange elsif node.respond_to? :endline node.endline..node.endline end } types=(1..stack.size-2).map{|i| stack[i].class } msg += "couldn't interpret #{types.inspect} at line ranges: #{ranges.inspect}" end super(msg) end |
Instance Attribute Details
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
661 662 663 |
# File 'lib/redparse.rb', line 661 def stack @stack end |