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


##########
java/languages.antlr/src/org/netbeans/modules/languages/antlr/v4/Antlr4ParserResult.java:
##########
@@ -211,7 +211,7 @@ protected ParseTreeListener createStructureListener() {
 
             @Override
             public void exitLexerRuleSpec(ANTLRv4Parser.LexerRuleSpecContext 
ctx) {
-                if (ctx.FRAGMENT() == null) {
+                if ((ctx.FRAGMENT() == null) && (ctx.TOKEN_REF() != null)) {

Review Comment:
   This reminds me of a question I had: I understand, that fragments don't end 
up in the parse tree, but from a user perspective, I'm very interested in them 
(they are after all primitives I can use to structure my grammar), so it would 
be good to show fragments in the structure tree.



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