aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2016-06-07 15:33:41 -0700
committerMatthew Dempsky <mdempsky@google.com>2016-08-16 14:32:06 -0700
commit49fb8d3cdb0406c11cc6341375367f8c81b3d143 (patch)
treedf67546ee9008c3ff8fd6e29064bfb8b0112503d
parent9be3d08e6ac6373ae5dc5504224ac99d81bd730e (diff)
downloadgo-49fb8d3cdb0406c11cc6341375367f8c81b3d143.tar.gz
go-49fb8d3cdb0406c11cc6341375367f8c81b3d143.zip
cmd/compile/internal/syntax: fix general comment lexing
Previously, we failed to recognize "**/" as the end of a general comment. Fixes ken/embed.go. Change-Id: Ibed746da105453420ec2d184e7be1a5de15927a6
-rw-r--r--src/cmd/compile/internal/syntax/scanner.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/syntax/scanner.go b/src/cmd/compile/internal/syntax/scanner.go
index 9ad165f820..9ede0fdbb6 100644
--- a/src/cmd/compile/internal/syntax/scanner.go
+++ b/src/cmd/compile/internal/syntax/scanner.go
@@ -536,10 +536,10 @@ skip:
func (s *scanner) fullComment() {
for {
r := s.getr()
- if r == '*' {
+ for r == '*' {
r = s.getr()
if r == '/' {
- break
+ return
}
}
if r < 0 {