vieiro commented on code in PR #6414:
URL: https://github.com/apache/netbeans/pull/6414#discussion_r1317757530
##########
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:
D'oh! It's a leftover from my debugging sessions and because of doing
commits being tired :-D.
But let's leave it as is, so we'll have to explicitly enable this log level
in the logger in case we want to see syntax errors details.
--
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