]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/parser/interface.go
go/ast: deprecate Object
[gostls13.git] / src / go / parser / interface.go
index 73cb16272e897d4c0db5b68c375d20a97621881c..d695162f2c94d2650649a4ecb05823713b19ad27 100644 (file)
@@ -53,7 +53,7 @@ const (
        Trace                                             // print a trace of parsed productions
        DeclarationErrors                                 // report declaration errors
        SpuriousErrors                                    // same as AllErrors, for backward-compatibility
-       SkipObjectResolution                              // don't resolve identifiers to objects - see ParseFile
+       SkipObjectResolution                              // skip deprecated identifier resolution; see ParseFile
        AllErrors            = SpuriousErrors             // report all errors (not just the first 10 on different lines)
 )
 
@@ -66,10 +66,12 @@ const (
 // for the src parameter must be string, []byte, or io.Reader.
 // If src == nil, ParseFile parses the file specified by filename.
 //
-// The mode parameter controls the amount of source text parsed and other
-// optional parser functionality. If the SkipObjectResolution mode bit is set,
-// the object resolution phase of parsing will be skipped, causing File.Scope,
-// File.Unresolved, and all Ident.Obj fields to be nil.
+// The mode parameter controls the amount of source text parsed and
+// other optional parser functionality. If the SkipObjectResolution
+// mode bit is set (recommended), the object resolution phase of
+// parsing will be skipped, causing File.Scope, File.Unresolved, and
+// all Ident.Obj fields to be nil. Those fields are deprecated; see
+// [ast.Object] for details.
 //
 // Position information is recorded in the file set fset, which must not be
 // nil.