Exception: Cucumber::Parser::SyntaxError
- Defined in:
- lib/cucumber/parser/treetop_ext.rb
Instance Method Summary collapse
-
#initialize(parser, file, line_offset) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(parser, file, line_offset) ⇒ SyntaxError
Returns a new instance of SyntaxError.
91 92 93 94 95 96 97 |
# File 'lib/cucumber/parser/treetop_ext.rb', line 91 def initialize(parser, file, line_offset) tf = parser.terminal_failures expected = tf.size == 1 ? tf[0].expected_string.inspect : "one of #{tf.map{|f| f.expected_string.inspect}.uniq*', '}" line = parser.failure_line + line_offset = "#{file}:#{line}:#{parser.failure_column}: Parse error, expected #{expected}." super() end |