thrifty icon indicating copy to clipboard operation
thrifty copied to clipboard

Parser should allow binary literals

Open benjamin-bader opened this issue 6 years ago • 3 comments

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 avatar Jul 30 '18 03:07 benjamin-bader

This feature would allow the following Thrift syntax:

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

benjamin-bader avatar Oct 08 '18 17:10 benjamin-bader

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

picimaci avatar Oct 26 '18 09:10 picimaci

Please, go ahead!

benjamin-bader avatar Oct 26 '18 17:10 benjamin-bader