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

&IF, &THEN, &ELSEIF, &ELSE, and &ENDIF preprocessor directives get parsed as errors #217

Open
gustason opened this issue Sep 23, 2024 · 4 comments
Assignees
Labels
blocked by 🌳 Blocked by tree-sitter implementation bug Something isn't working

Comments

@gustason
Copy link
Collaborator

gustason commented Sep 23, 2024

For example,

&IF LOOKUP("{&OPSYS}","MSDOS,WIN32":U) > 0 &THEN
    &SCOPED-DEFINE SLASH ~~~\
&ELSE
    &SCOPED-DEFINE SLASH /
&ENDIF

Gets parsed as this:
image

Another example:

&if '{&name}' = '' &then
    &scoped-define name ttTable
&endif

define {&visibility} temp-table {&name} no-undo
  field something as int
  field something2 as char
  index something as primary unique something
.

image

@gustason gustason added bug Something isn't working to create 🌳 Create and link tree-sitter ticket labels Sep 23, 2024
@gustason
Copy link
Collaborator Author

Same thing for &GLOBAL and &GLOBAL-DEFINE:

&GLOBAL Main_index 49153
&GLOBAL-DEFINE MAX-EXPENSE 5000

both get parsed as errors.

@eglekaz
Copy link
Collaborator

eglekaz commented Oct 11, 2024

Registered: usagi-coffee/tree-sitter-abl#88

@eglekaz eglekaz added blocked by 🌳 Blocked by tree-sitter implementation and removed to create 🌳 Create and link tree-sitter ticket labels Oct 11, 2024
@eglekaz eglekaz self-assigned this Oct 11, 2024
@ccecvb
Copy link

ccecvb commented Dec 4, 2024

I noticed
&then
changes to

&
then

That is probably related to this

image

@PauliusKu
Copy link
Collaborator

@ccecvb yes, currently, the parser we use incorrectly understands preprocessor directives, so we are waiting for the fix on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by 🌳 Blocked by tree-sitter implementation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants