Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thrift-typescript doesn't accept maps with the key-value pairs not separated with a comma #170

Open
Aurora12 opened this issue Jul 30, 2019 · 1 comment

Comments

@Aurora12
Copy link

Aurora12 commented Jul 30, 2019

We have a map definition with newlines for delimiters and thrift-typescript doesn't like that.

const map<i32,string> DATA_TYPE = {
    -4: 'Notice'
    -1: 'BackendException'
    1: 'GetConnectionId'
    2: 'ResolveCountry'
    // ...etc
}
Parse Error:
Message: Closing brace missing from map definition
1093 | const map<i32,string> DATA_TYPE = {
                ^

We are using thrift generators for several languages–Scala, Kotlin, Swift, ObjectiveC–and all of them are perfectly fine with newlines instead of commas. So, I presume, this should be the standard behaviour.

This is probably a minor issue, given that it's easily fixed by adding commas, but so you know.

@hayes
Copy link
Contributor

hayes commented Aug 1, 2019

Pretty sure this would be an issue with the parser, which is in a separate repo: https://github.com/creditkarma/thrift-parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants