Skip to content
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

Preprocessor directives are falsely reported as E001 Syntax error #224

Open
davidpfister opened this issue Dec 11, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@davidpfister
Copy link

On Windows 10, with fortitude 0.6.1, when using preprocessor directive (#define) before the module, fortitude reports a synthax error

#define set_error(id, msg) \
 if (present(ierr)) ierr = id; \
if (present(errmsg)) errmsg = msg;
module test
...
@ZedThree ZedThree added the bug Something isn't working label Dec 11, 2024
@ZedThree
Copy link
Member

This is unfortunately coming from the tree-sitter-fortran grammar, currently it can't handle multiline preprocessor #defines like this, there's a clash with the line continuations.

I'd like to improve this aspect, but the preprocessor complicates the grammar a lot unfortunately!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants