-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a tolerant parser for Freemarker #1
Comments
If this is the problem you feel the most motivated to address, out of professional curiosity or anything else, then do it, and of course I will help where I can. However, I would like to point out that this is hardly a low hanging fruit. It's also something without which the users can survive; they only see the first error, and until they fix it, there's no outline and such extras. Ugly, but not critical. Reaching a state where this plugin can roughly do what the JBoss Tools FreeMarker IDE can, plus maybe have "web editor" features, is an awesome enough first milestone. So while I think this feature is important (and was requested by others as well), it's not the highest priority at the moment, especially as it's certainly a harder one. But again, of course do whichever part you feel like doing, after all you do it for free. Back to the issue itself... Just in case you haven't found it, look at this: https://javacc.org/tutorials/errorrecovery After a quick look I think that:
|
parser (see #1) Signed-off-by: azerr <[email protected]>
To support advanced LSP feature like completion, outline, etc we need to have a Freemarker AST with location. Today we cannot use the Freemarker FMParser because it is not tolerant.
I create this issue to know how to fix that. There are 2 solutions:
Implement a (basic) tolerant parser for Freemarker to implement after LSP commands like HTML Language Server (VSCode) does:
It's the ideal solution to use the existing FMParser but it's an hard task.
I have retrieved an interesting discussion about the FMParser tolerant that I had http://freemarker.624813.n4.nabble.com/FMParser-improvment-for-DLTK-Freemarker-plugin-td2265334.html
It should be very fantastic if we could use the FMParser as tolerant parser with custom structure by using a factory kind, in other words:
have started to play with FMParser (2.3) and to support tolerant parser, we need:
The difficulty is to find the whole code which throw error like ParseException, call of jj_consume_token (like jj_consume_token(CLOSING_CURLY_BRACKET); which throw error.
The text was updated successfully, but these errors were encountered: