-
Notifications
You must be signed in to change notification settings - Fork 137
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
Parser fails on ?STACKTRACE macro #993
Comments
Yes this is still an issue even with erlfmt. |
hi @plux ofc the above is valid, compiling erlang code, so I'm not sure how far we can/should go in handling exotic macros |
Yes, the erlfmt parser does not handle this either. In general we only handle lexical macros - i.e. macros that are complete lexical elements. In particular in here the Supporting things like that with the current approach to parsing either in els_dodget, but also in erlfmt, seems generally extremely complex if not outright impossible. |
All right, marking this as a "won't fix" for the time being, but we can keep this for reference. Should things change we can re-open the issue. |
Describe the bug
EEP-47 added new syntax to retrieve stacktraces in try/catch and thus deprecated the use of
erlang:get_stacktrace()
.To handle backwards compatibility the use of a macro became widespread in the Erlang community:
Which could be used like this:
However unfortunately
els_parser
(els_dodger
?) fails to parse this syntax and this means that POIs in a function which uses the?STACKTRACE
macro won't be registered.To Reproduce
Add a module such as this to a project
Place pointer on call to
b()
insidea()
and try to goto definition.Expected behavior
Pointer jumps to definition of b().
Actual behavior
Editor tells me "No definitions found for: b"
Context
erlang_ls
version (tag/sha): 0.15.0The text was updated successfully, but these errors were encountered: