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

[BUG] Underscores as digit separators are not supported in the grammar #72

Open
3 tasks done
mmanela opened this issue May 31, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@mmanela
Copy link

mmanela commented May 31, 2024

Describe the bug

Hack documentation says you can use underscores as digit separators but the grammar errors if you use them.

Requirements

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

To Reproduce

Use an integer with underscore digit separators

 $a = 123_456;

Which currently parses as the following (notice the ERROR)

(expression_statement
        (binary_expression
          left: (variable)
          (ERROR
            (integer))
          right: (qualified_identifier
            (identifier))))

Expected behavior

I expect usage of the underscore digit separator to parse properly.

@mmanela mmanela added the bug Something isn't working label May 31, 2024
@Saichandra2520
Copy link

I'm currently working on this issue and will submit a pull request soon. #72

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