samuel / go-thrift

A native Thrift package for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax error on map const when missing a comma

jameshong92 opened this issue · 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",
}