]> Cypherpunks repositories - gostls13.git/commitdiff
rename exp/parser package to oldParser
authorRobert Griesemer <gri@golang.org>
Fri, 11 Dec 2009 02:27:48 +0000 (18:27 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Dec 2009 02:27:48 +0000 (18:27 -0800)
to allow simultaneous import with the
current go/parser

R=rsc
https://golang.org/cl/174053

src/pkg/exp/parser/interface.go
src/pkg/exp/parser/parser.go
src/pkg/exp/parser/parser_test.go

index 7e8f5d25ef6a8fd8090e12e0e7f07133eb45de53..ca01de2001be4de1b7838fd388ee5b3d054514ab 100644 (file)
@@ -4,7 +4,7 @@
 
 // This file contains the exported entry points for invoking the parser.
 
-package parser
+package oldParser
 
 import (
        "bytes";
index 98f57d370243e3e65df50fd139c464491fd912fc..32360b5d6aacff6e35689e3b9021be3814ee2877 100644 (file)
@@ -2,12 +2,17 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// A parser for Go source files. Input may be provided in a variety of
-// forms (see the various Parse* functions); the output is an abstract
-// syntax tree (AST) representing the Go source. The parser is invoked
-// through one of the Parse* functions.
+// A parser for "old" Go source files using the old semicolon syntax.
+// Input may be provided in a variety of forms (see the various Parse*
+// functions); the output is an abstract syntax tree (AST) representing
+// the Go source. The oldParser is invoked through one of the Parse*
+// functions.
 //
-package parser
+// NOTE: This package is deprecated and will be removed once all Go code
+//       has been converted to using the new syntax and after a reasonable
+//       grace period.
+//
+package oldParser
 
 import (
        "container/vector";
index 2aa1d436660a01429ed3dd0444cbdb8d53ae6057..e012818157e0c3b266ec3af5dd0c8191a8af04d7 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package parser
+package oldParser
 
 import (
        "os";
@@ -82,7 +82,7 @@ func TestParse4(t *testing.T) {
        if err != nil {
                t.Fatalf("ParsePackage(%s): %v", path, err)
        }
-       if pkg.Name != "parser" {
+       if pkg.Name != "oldParser" {
                t.Errorf("incorrect package name: %s", pkg.Name)
        }
        for filename, _ := range pkg.Files {