thrifty
thrifty copied to clipboard
Parser should allow binary literals
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
.
This feature would allow the following Thrift syntax:
struct Example {
1: binary SomeBinary = "0xDEADBEEF"
}
I don't have any experience with ANTLR grammar yet but I would gladly give this a go if it's okay :)
Please, go ahead!