aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-08-04 10:12:20 +0800
committerMatthew Dempsky <mdempsky@google.com>2022-08-04 20:35:21 +0000
commit91d5ce3def7c967b23de37546439bb4714e26e8a (patch)
tree5b4c435f91279ba82eaed7432339f621f5c39c50 /src/cmd/asm/internal
parent39728f412d5fb6d97568cc84a42f1caf07dbaedc (diff)
downloadgo-91d5ce3def7c967b23de37546439bb4714e26e8a.tar.xz
all: clean up TODO after fixing issue 44505
For #44505 Change-Id: I89220be02372b5340cb987bf2ac870a9346a8c8f Reviewed-on: https://go-review.googlesource.com/c/go/+/421079 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/asm/internal')
-rw-r--r--src/cmd/asm/internal/lex/tokenizer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/asm/internal/lex/tokenizer.go b/src/cmd/asm/internal/lex/tokenizer.go
index 4db88e20c3..f60f7a11af 100644
--- a/src/cmd/asm/internal/lex/tokenizer.go
+++ b/src/cmd/asm/internal/lex/tokenizer.go
@@ -5,6 +5,7 @@
package lex
import (
+ "go/build/constraint"
"io"
"os"
"strings"
@@ -109,8 +110,7 @@ func (t *Tokenizer) Next() ScanToken {
}
text := s.TokenText()
t.line += strings.Count(text, "\n")
- // TODO: Use constraint.IsGoBuild once #44505 fixed.
- if strings.HasPrefix(text, "//go:build") {
+ if constraint.IsGoBuild(text) {
t.tok = BuildComment
break
}