mirror of
https://github.com/golang/go
synced 2024-11-25 16:17:56 -07:00
- fixed another parser bug, now correctly parse more tests
R=r OCL=15518 CL=15518
This commit is contained in:
parent
6a0fb60866
commit
6e08991eba
@ -680,7 +680,9 @@ func (P *Parser) ParseCall(x AST.Expr) AST.Expr {
|
||||
P.Expect(Scanner.LPAREN);
|
||||
if P.tok != Scanner.RPAREN {
|
||||
// first arguments could be a type if the call is to "new"
|
||||
if P.tok != Scanner.IDENT && P.TryType() {
|
||||
// - exclude type names because they could be expression starts
|
||||
// - exclude "("'s because function types are not allowed and they indicate an expression
|
||||
if P.tok != Scanner.IDENT && P.tok != Scanner.LPAREN && P.TryType() {
|
||||
if P.tok == Scanner.COMMA {
|
||||
P.Next();
|
||||
if P.tok != Scanner.RPAREN {
|
||||
|
Loading…
Reference in New Issue
Block a user