lkishalmi commented on code in PR #6414:
URL: https://github.com/apache/netbeans/pull/6414#discussion_r1317693432


##########
rust/rust.grammar/src/org/netbeans/modules/rust/grammar/RustLanguageLexer.java:
##########
@@ -41,35 +40,55 @@ public class RustLanguageLexer extends 
AbstractAntlrLexerBridge<RustLexer, RustT
 
     private static final Logger LOG = 
Logger.getLogger(RustLanguageLexer.class.getName());
 
-    private static String formatMessage(String kind, Recognizer<?, ?> 
recognizer, Object o, int line, int charPositionInLine, String message, 
RecognitionException ex) {
-        return String.format("%s @%3d:%-3d %s", kind, line, 
charPositionInLine, message);
-    }
-
+    /**
+     * A BaseErrorListener that listens for errors in the lexer. We avoid
+     * throuing exceptions, since AbstractAntlrLexerBridge doesn't know how to
+     * handle them and this may interfere with the EDT. We enable logginf of
+     * errors instead, for debugging and enhancement purposes.
+     */
     private static final class RustLanguageLexerErrorListener extends 
BaseErrorListener {
 
+        private static final Level LEVEL = Level.FINE;

Review Comment:
   Is `Level.FINE` intentional here, or leftover from your debugging sessions?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to