Closed dgrr closed 4 years ago
Would this solve the problem?
vi := &ast.TypeStruct{Kind: ast.TypeStructType} // Structs: $3}
for k, v := range $3 {
vi.StructNames = append(vi.StructNames, k)
vi.StructTypes = append(vi.StructTypes, v)
}
$$ = vi
Not sure why you are getting that error. Have you updated to the latest version? go get -u github.com/mattn/anko
Well... Structs
is not defined in that structure. And yes, I updated
Sorry, I am not following what the issue is. Do you have a code example of what is not working?
On anko/parser
dgrr:xs 20:54:52 [master] $ rm parser.go
dgrr:xs 20:54:54 [master x] $ make
goyacc -o parser.go parser.go.y
conflicts: 193 shift/reduce, 211 reduce/reduce
gofmt -s -w .
dgrr:xs 20:54:59 [master !?] $ go build
# github.com/mattn/anko/parser
parser.go.y:693: unknown field 'Structs' in struct literal of type ast.TypeStruct
You are correct, having same issue
Looks like I missed uploading some of the parser changes. Working on a fix.
@dgrr Thank you for finding this.
In https://github.com/mattn/anko/blob/master/parser/parser.go.y#L693
For some reason it doesn't exist here https://github.com/mattn/anko/blob/master/parser/parser.go#L2022