summaryrefslogtreecommitdiff
path: root/usr/gri/pretty/compilation.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-04-16 20:52:37 -0700
committerRuss Cox <rsc@golang.org>2009-04-16 20:52:37 -0700
commitc93d66a312c9b1a271cf3a68c84c5e9f98cefd37 (patch)
treefc0d1bfb34a87c27e16c2bc4978b7cf4dd7b134e /usr/gri/pretty/compilation.go
parent1a5a70789067ecf10d6a560c873c8a5552c6e82d (diff)
downloadgolang-c93d66a312c9b1a271cf3a68c84c5e9f98cefd37.tar.gz
Convert go tree to hierarchical pkg directory:
import ( "vector" -> "container/vector" "ast" -> "go/ast" "sha1" -> "hash/sha1" etc. ) and update Makefiles. Because I did the conversion semi-automatically, I sorted all the import blocks as a post-processing. Some files have therefore changed that didn't strictly need to. Rename local packages to lower case. The upper/lower distinction doesn't work on OS X and complicates the "single-package directories with the same package name as directory name" heuristic used by gobuild and godoc to create the correlation between source and binary locations. Now that we have a plan to avoid globally unique names, the upper/lower is unnecessary. The renamings will cause trouble for a few users, but so will the change in import paths. This way, the two maintenance fixes are rolled into one inconvenience. R=r OCL=27573 CL=27575
Diffstat (limited to 'usr/gri/pretty/compilation.go')
-rw-r--r--usr/gri/pretty/compilation.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr/gri/pretty/compilation.go b/usr/gri/pretty/compilation.go
index 7dd2bccb5..b03d6b33f 100644
--- a/usr/gri/pretty/compilation.go
+++ b/usr/gri/pretty/compilation.go
@@ -5,18 +5,18 @@
package Compilation
import (
- "vector";
- "utf8";
+ "container/vector";
"fmt";
+ "go/ast";
+ "go/parser";
+ "go/scanner";
+ "go/token";
"os";
- "utils";
"platform";
- "token";
- "scanner";
- "parser";
- "ast";
- "typechecker";
"sort";
+ "typechecker";
+ "utf8";
+ "utils";
)
@@ -63,7 +63,7 @@ func (h *errorHandler) Init(filename string, columns bool) {
func (h *errorHandler) Error(pos token.Position, msg string) {
- // only report errors that are on a new line
+ // only report errors that are on a new line
// in the hope to avoid most follow-up errors
if pos.Line == h.errline {
return;
@@ -102,7 +102,7 @@ func Compile(filename string, flags *Flags) (*ast.Program, ErrorList) {
if ok2 {
TypeChecker.CheckProgram(&err, prog);
}
-
+
// convert error list and sort it
errors := make(ErrorList, err.errors.Len());
for i := 0; i < err.errors.Len(); i++ {