Method: Lexer#getErrorDisplayForChar
- Defined in:
- lib/antlr4/Lexer.rb
#getErrorDisplayForChar(c) ⇒ Object
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/antlr4/Lexer.rb', line 293 def getErrorDisplayForChar(c) begin cc = c[0].ord rescue ArgumentError cc = "\ufffd".ord end if cc==Token::EOF then return "<EOF>" elsif c == "\n" return "\\n" elsif c=="\t" return "\\t" elsif c=="\r" return "\\r" else return c end end |