]> Cypherpunks repositories - gostls13.git/commit
[dev.inline] cmd/compile/internal/syntax: clean up error and pragma handling
authorRobert Griesemer <gri@golang.org>
Fri, 2 Dec 2016 06:04:49 +0000 (22:04 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 9 Dec 2016 01:35:03 +0000 (01:35 +0000)
commit54ef0447fed1a59b95111b86a037c3443daf0b9b
tree204aa341250ac36b31f6cab4ee0c92887c834526
parente97c8a592f20d390a97db1d516782c56badf258d
[dev.inline] cmd/compile/internal/syntax: clean up error and pragma handling

Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33873/.

- simplify error handling in source.go
  (move handling of first error into parser, where it belongs)

- clean up error handling in scanner.go

- move pragma and position base handling from scanner
  to parser where it belongs

- have separate error methods in parser to avoid confusion
  with handlers from scanner.go and source.go

- (source.go) and (scanner.go, source.go, tokens.go)
  may be stand-alone packages if so desired, which means
  these files are now less entangled and easier to maintain

Change-Id: I81510fc7ef943b78eaa49092c0eab2075a05878c
Reviewed-on: https://go-review.googlesource.com/34235
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/syntax/parser.go
src/cmd/compile/internal/syntax/scanner.go
src/cmd/compile/internal/syntax/scanner_test.go
src/cmd/compile/internal/syntax/source.go