matthiasblaesing commented on code in PR #4549:
URL: https://github.com/apache/netbeans/pull/4549#discussion_r974528487


##########
java/languages.antlr/src/org/netbeans/modules/languages/antlr/AntlrParserResult.java:
##########
@@ -66,6 +66,11 @@ public AntlrParserResult get() {
             parser.addParseListener(createStructureListener(fo));
             parser.addParseListener(createOccurancesListener());
             evaluateParser(parser);
+
+            // Start a second parsing phase for checking;
+            parser = createParser(getSnapshot());
+            parser.addParseListener(createCheckReferences(fo));

Review Comment:
   I just noticed, that all listeners can drop the `FileObject` argument, as 
the parser now only runs over a single file, which is accessible via 
`getSnapshot().getSource().getFileObject()`.



-- 
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