aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/scanner.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2016-12-01 15:25:07 -0800
committerRobert Griesemer <gri@golang.org>2016-12-09 01:35:00 +0000
commite97c8a592f20d390a97db1d516782c56badf258d (patch)
tree5bd1b2cd96dcf2ad84c82242b458189412b8c5a9 /src/cmd/compile/internal/syntax/scanner.go
parent32bf2829a17a90bdbd472335707639ba35776da6 (diff)
downloadgo-e97c8a592f20d390a97db1d516782c56badf258d.tar.gz
go-e97c8a592f20d390a97db1d516782c56badf258d.zip
[dev.inline] cmd/compile/internal/syntax: simplified position code
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33805/. Change-Id: I859d9bd5f2256ca78f7b24b330290f7ae600854d Reviewed-on: https://go-review.googlesource.com/34234 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/scanner.go')
-rw-r--r--src/cmd/compile/internal/syntax/scanner.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/scanner.go b/src/cmd/compile/internal/syntax/scanner.go
index 6fdc0dc6da..77d7a1beef 100644
--- a/src/cmd/compile/internal/syntax/scanner.go
+++ b/src/cmd/compile/internal/syntax/scanner.go
@@ -577,7 +577,7 @@ func (s *scanner) lineComment() {
}
nstr := text[i+1:]
n, err := strconv.Atoi(nstr)
- if err != nil || n <= 0 || n > lineM {
+ if err != nil || n <= 0 || n > lineMax {
s.error_at(s.line0, s.col0-uint(len(nstr)), "invalid line number: "+nstr)
return
}