new Parser(proto)
Constructs a new Parser.
Parameters:
Name | Type | Description |
---|---|---|
proto |
string | Protocol source |
Members
-
tn :ProtoBuf.DotProto.Tokenizer
-
Tokenizer.
Methods
-
parse() → {{package: string|null, messages: Array.<object>, enums: Array.<object>, imports: Array.<string>, options: object<string,*>}}
-
Runs the parser.
Throws:
If the source cannot be parsed- Type
- Error
Returns:
- Type
- {package: string | null, messages: Array.<object>, enums: Array.<object>, imports: Array.<string>, options: object<string,*>}
-
toString() → {string}
-
Returns a string representation of this object.
Returns:
String representation as of "Parser"
- Type
- string