When I achieved self-hosting, composite literals were not supported yet, so I had no choice but to write this kind of clumsy
field-by-field assignments.
var branchStmt = &ast.BranchStmt{}
branchStmt.Tok = token.Token(tok)
return branchStmt
However, we don't need to do this any more. This can be rewritten in a short form:
When I achieved self-hosting, composite literals were not supported yet, so I had no choice but to write this kind of clumsy field-by-field assignments.
However, we don't need to do this any more. This can be rewritten in a short form: