Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Nov 2, 2023
1 parent bd55524 commit 91180f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -3648,7 +3648,7 @@ func (p *parser) parseGlobalStmts(sync map[token.Token]bool, pos token.Pos, stmt
p.advance(sync)
}
if p.tok != token.EOF {
p.expect(token.SEMICOLON)
p.errorExpected(p.pos, "statement", 2)
}
f := &ast.FuncDecl{
Name: &ast.Ident{NamePos: pos, Name: "main"},
Expand Down
2 changes: 1 addition & 1 deletion parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ const d

func TestErrGlobal(t *testing.T) {
testErrCode(t, `func test() {}
}`, `/foo/bar.gop:2:1: expected ';', found '}'`, ``)
}`, `/foo/bar.gop:2:1: expected statement, found '}'`, ``)
}

// -----------------------------------------------------------------------------

0 comments on commit 91180f1

Please sign in to comment.