]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: fix syntax.Parse doc string, improved tests
authorRobert Griesemer <gri@golang.org>
Thu, 15 Feb 2018 00:59:36 +0000 (16:59 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 15 Feb 2018 01:48:21 +0000 (01:48 +0000)
commiteda39fe9b2bdae054a6d0b93efb9b40cc9d24391
treed5f20329ea31440dd98871d6cab46d8e89e41c72
parent1a2273874953517cc38f7005e985c91d16ebf33c
cmd/compile/internal/syntax: fix syntax.Parse doc string, improved tests

1) Fix the doc string for syntax.Parse: The returned AST is
always nil if there was an error and an error handler is missing.

2) Adjust the syntax Print and Dump tests such that they print and
dump the AST even in the presence of errors.

Change-Id: If658eabdcc83f578d815070bc65d1a5f6cfaddfc
Reviewed-on: https://go-review.googlesource.com/94157
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/syntax/dumper_test.go
src/cmd/compile/internal/syntax/nodes.go
src/cmd/compile/internal/syntax/printer_test.go
src/cmd/compile/internal/syntax/syntax.go