Support parsing c++ specific and other esoteric syntax
For better compatibility with the standard parser should parse the rarer bits of the IDL.
https://thrift.apache.org/docs/idl
We have this in most of our Thrift definitions and makes the parser crash:
namespace py.twisted txthrift.service.common
This is the error it generates.
$ generator common.thrift go
<reader>:5:1 (94): rule SyntaxError: parser: syntax error
Also, I'm not sure this was an appropriate issue for this.
Interesting, I assume that's accepted by the official thrift tool? They're spec shows namespace scope as NamespaceScope ::= '*' | 'cpp' | 'java' | 'py' | 'perl' | 'rb' | 'cocoa' | 'csharp' but that's likely out of date. Following that the parser in this package just allows [a-z]+ . I'll change it to allow . in scopes.
Interesting, I assume that's accepted by the official thrift tool?
Yes it is. The output is different as well from regular Python, not just the namespace/import path. So there's definitely support for it.
I'll change it to allow
.in scopes.
Super! It seems https://github.com/samuel/go-thrift/commit/e7cab3d2c73a17194c9f5dc22eb2c4b441ed7254 fixed my issue. Thanks!