go-thrift icon indicating copy to clipboard operation
go-thrift copied to clipboard

Syntax error on map const when missing a comma

Open jameshong92 opened this issue 7 years ago • 0 comments

Example:

const map<string, string> Foo = {
  "hello": "it's me"
  "hi": "how are you",
}

Returns:

$ generator example.thrift $GOPATH/src
example.thrift:1:1 (0): rule SyntaxError: parser: syntax error

It works as expected if I add a trailing comma:

const map<string, string> Foo = {
  "hello": "it's me",
  "hi": "how are you",
}

jameshong92 avatar Feb 23 '17 08:02 jameshong92