]> Cypherpunks repositories - gostls13.git/commit
go/parser: document that parse functions need valid token.FileSet
authorRobert Griesemer <gri@golang.org>
Fri, 10 Jun 2016 17:27:37 +0000 (10:27 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 10 Jun 2016 17:43:35 +0000 (17:43 +0000)
commite980a3d8856ec3b4f11daa7e5ec417ad4f5c5256
tree31fcb71f069f09b3a818998a513c6b9d50b41b6f
parentfee02d270bf850d5b390000d8545c3609718e9a5
go/parser: document that parse functions need valid token.FileSet

+ panic with explicit error if no file set it provided

(Not providing a file set is invalid use of the API; panic
is the appropriate action rather than returning an error.)

Fixes #16018.

Change-Id: I207f5b2a2e318d65826bdd9522fce46d614c24ee
Reviewed-on: https://go-review.googlesource.com/24010
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/go/parser/interface.go