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

Parser should allow binary literals #185

Open
benjamin-bader opened this issue Jul 30, 2018 · 3 comments
Open

Parser should allow binary literals #185

benjamin-bader opened this issue Jul 30, 2018 · 3 comments

Comments

@benjamin-bader
Copy link
Collaborator

They aren't explicitly supported by the Apache compiler, but I don't think they're disallowed, either. They'd be neat. Let's suppose that they should be hex strings.

The change would need to be in the ANTLR grammar first, then in the validation logic in Constant.kt.

@benjamin-bader
Copy link
Collaborator Author

This feature would allow the following Thrift syntax:

struct Example {
  1: binary SomeBinary = "0xDEADBEEF"
}

@picimaci
Copy link

I don't have any experience with ANTLR grammar yet but I would gladly give this a go if it's okay :)

@benjamin-bader
Copy link
Collaborator Author

Please, go ahead!

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

No branches or pull requests

2 participants