Noir::ThriftIdl
Reads the parts of an Apache Thrift IDL document that describe an RPC
surface: include headers and service definitions with their
functions. Structs, enums, consts and typedefs are skipped.
The parser works on tokens rather than lines because Thrift is
whitespace-free: a function may span several lines, fields may be
separated by ,, ; or nothing at all, and annotations
((key = "value")) can follow a type, a field, a function or a service.
Constants
Words that may precede a function's return type. oneway is Apache
Thrift; readonly and idempotent are fbthrift qualifiers.
Class methods
Blanks //, /* */ and # comments, keeping every newline so line
numbers in the result match the original. Quoted literals (single or
double) are kept verbatim, so a # or // inside an annotation value
is not mistaken for a comment.