thrift-parser
thrift-parser copied to clipboard
A Thrift Parser built in TypeScript that generates a TypeScript AST that retains the Thrift grammar

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. Release notes Sourced from pathval's releases. v1.1.1 Fixes a security issue around prototype pollution. Commits db6c3e3 chore: v1.1.1 7859e0e Merge pull request #60 from...
I need transform thrift to ast, format it, and then ast to thrift. How generate thrift from ast?
code: ```ts import * as thrift from '@creditkarma/thrift-parser'; const document = thrift.parse(`structt`); console.log('doc', document) ``` error: ```sh TypeError: Cannot read property 'start' of undefined (node_modules/@creditkarma/thrift-parser/src/main/debugger.ts:69:41) ```
** This is a breaking change, it changes the format of the AST ** Closes #65
This is not exactly in the spec, but most Thrift parsers allow trailing semi-colon after typedef.
Fixes #66
If you have this IDL: ```thrift /* */ const string asdf = 'sdf' ``` The AST will return an empty document: ```json { "type": "ThriftDocument", "body": [] } ``` -----...