cmd/asm/internal/lex: format error correctly

Error doesn't take a format string and appends its own newline. Phrase
the error like the other ones.

Change-Id: Ic3af857e5d4890207c74a6eb59a0d1067b503e1b
Reviewed-on: https://go-review.googlesource.com/16420
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Dominik Honnef 2015-10-28 07:44:35 +01:00 committed by Ian Lance Taylor
parent 11cf5da0e3
commit 53d42fbead

View file

@ -261,7 +261,7 @@ func (in *Input) macroDefinition(name string) ([]string, []Token) {
// Scan to newline. Backslashes escape newlines.
for tok != '\n' {
if tok == scanner.EOF {
in.Error("missing newline in macro definition for %q\n", name)
in.Error("missing newline in definition for macro:", name)
}
if tok == '\\' {
tok = in.Stack.Next()