Class: ConsoleErrorListener
- Inherits:
-
ErrorListener
- Object
- ErrorListener
- ConsoleErrorListener
- Defined in:
- lib/antlr4/error/ErrorListener.rb
Constant Summary collapse
- @@instance =
Provides a default instance of ConsoleErrorListener.
nil
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ErrorListener
#reportAmbiguity, #reportAttemptingFullContext, #reportContextSensitivity
Class Method Details
.INSTANCE ⇒ Object
52 53 54 55 56 57 |
# File 'lib/antlr4/error/ErrorListener.rb', line 52 def self.INSTANCE if @@instance.nil? then @@instance = self.new() end @@instance end |
Instance Method Details
#syntaxError(recognizer, offendingSymbol, line, column, msg, e) ⇒ Object
@inheritDoc
<p> This implementation prints messages to System#err containing the values of line, charPositionInLine, and msg using the following format.</p>
<pre> line line:charPositionInLine msg </pre>
70 71 72 |
# File 'lib/antlr4/error/ErrorListener.rb', line 70 def syntaxError(recognizer, offendingSymbol, line, column, msg, e) STDERR.puts "line #{line}:#{column} #{msg}" end |