1) Scopes do have a comment field for documentation (debugging output).
No need to do anything extra.
2) The testcase in expr3.src has ok error messages. Enabled.
Change-Id: Ic1a03bfec0a6a70d876aa6cfb936973abe58fe6c
Reviewed-on: https://go-review.googlesource.com/c/139902
Reviewed-by: Alan Donovan <adonovan@google.com>
"strings"
)
-// TODO(gri) Provide scopes with a name or other mechanism so that
-// objects can use that information for better printing.
-
// A Scope maintains a set of objects and links to its containing
// (parent) and contained (children) scopes. Objects may be inserted
// and looked up by name. The zero value for Scope is a ready-to-use
f1(x ... /* ERROR "cannot use ..." */ )
f1(g0 /* ERROR "used as value" */ ())
f1(g1())
- // f1(g2()) // TODO(gri) missing position in error message
+ f1(g2 /* ERROR "cannot use g2" */ /* ERROR "too many arguments" */ ())
f2() /* ERROR "too few arguments" */
f2(3.14) /* ERROR "too few arguments" */