You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is normal behavior. When you save the grammar all diagnostics collected by the extension are replaced by those reported from ANTLR4. This usually gives you more issues than what was found internally. In your case however it seems that ANTLR4 only issues a warning, but no error. Hence your unkown rule/token errors disappear.
This could happen when ANTLR4 can find those rules and the extension cannot, which is a rather strange situation unless you have a special setup and the extension cannot find an import or a token vocabulary. Please check if e.g. that FLOATING_POINT_LITERAL is defined somewhere else which makes ANTLR4 able to resolve it. Is it perhaps in a .tokens file only? This is not examined by the extension and can hence lead to slightly different behavior.
Well, I didn't set antlr4.generation.importDir, and it seems that code won't generate if there's any error in .g4 file, so .tokens file doesn't exist as well.
The visual example (sry the quality is suck):
Well, I can't tell whether this is a bug of the extension or vsc itself. Anyway, please try to reproduce this to figure out.
The text was updated successfully, but these errors were encountered: