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

Method calls are incorrectly parsed #3

Open
divarvel opened this issue Nov 29, 2024 · 0 comments
Open

Method calls are incorrectly parsed #3

divarvel opened this issue Nov 29, 2024 · 0 comments

Comments

@divarvel
Copy link
Collaborator

divarvel commented Nov 29, 2024

using the v5 branch,

check if $a.length();
check if $a.contains("a");

is parsed as

    (source_file
      (authorizer_element
        (check
          (rule_body
            (expression
              (methods
                (expression
                  (term
                    (variable)))
                (nname))))))
      (authorizer_element
        (check
          (rule_body
            (expression
              (methods
                (expression
                  (term
                    (variable)))
                (nname)
                (ERROR
                  (string))))))))

it seems that the method calls are correctly parsed as long as they don’t have arguments.

I have tried with defining $.method_argument to be just $.expression (or even $.term) and got the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant