cmd/compile: remove unneeded error message cleanup pass

This code used to be necessary because of the error messages generated
by the YACC-based parser, but they're no longer relevant under the new
recursive descent parser:

  - LBRACE no longer exists, so "{ or {" can never occur.

  - The parser never generates error messages about "@" or "?" now
    (except in import sections, where they're actually legitimate).

  - The s/LLITERAL/litbuf/ substitution is handled in p.syntax_error.

Change-Id: Id39f747e4aa492c5830d14a47b161920bd4589ad
Reviewed-on: https://go-review.googlesource.com/17690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2015-12-09 12:53:28 -08:00
parent 0b37a6f47b
commit 07f9c25b35
2 changed files with 0 additions and 11 deletions

View file

@ -142,7 +142,6 @@ func (p *parser) syntax_error(msg string) {
var tok string
switch p.tok {
case LLITERAL:
// this is also done in Yyerror but it's cleaner to do it here
tok = litbuf
case LNAME:
if p.sym_ != nil && p.sym_.Name != "" {