]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm/internal/lex: format error correctly
authorDominik Honnef <dominik@honnef.co>
Wed, 28 Oct 2015 06:44:35 +0000 (07:44 +0100)
committerIan Lance Taylor <iant@golang.org>
Sun, 8 Nov 2015 19:17:54 +0000 (19:17 +0000)
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>

src/cmd/asm/internal/lex/input.go

index e5a33013e17d2c35254b9863f7b4466f1947020f..33b9d8adeaf439c009bcd4689e887ceb914241c3 100644 (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()