parser: just return node :)
This commit is contained in:
parent
0ed9465e4b
commit
39f76a99eb
@ -43,12 +43,10 @@ func (p *Parser) parseObjectList() (*ast.ObjectList, error) {
|
|||||||
break // we are finished
|
break // we are finished
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we don't return a nil, because might want to use already collected
|
||||||
|
// items.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if p.tok.Type != token.RBRACE {
|
return node, err
|
||||||
return nil, err
|
|
||||||
} else {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we successfully parsed a node, add it to the final source node
|
// we successfully parsed a node, add it to the final source node
|
||||||
|
Loading…
Reference in New Issue
Block a user