summaryrefslogtreecommitdiff
path: root/usr/gri
diff options
context:
space:
mode:
Diffstat (limited to 'usr/gri')
-rw-r--r--usr/gri/pretty/astprinter.go16
-rw-r--r--usr/gri/pretty/compilation.go20
-rw-r--r--usr/gri/pretty/docprinter.go6
-rw-r--r--usr/gri/pretty/godoc.go8
-rw-r--r--usr/gri/pretty/pretty.go8
-rw-r--r--usr/gri/pretty/symboltable.go4
-rw-r--r--usr/gri/pretty/typechecker.go6
-rw-r--r--usr/gri/pretty/untab.go4
8 files changed, 36 insertions, 36 deletions
diff --git a/usr/gri/pretty/astprinter.go b/usr/gri/pretty/astprinter.go
index 4e5fcba07..4f32c2304 100644
--- a/usr/gri/pretty/astprinter.go
+++ b/usr/gri/pretty/astprinter.go
@@ -5,17 +5,17 @@
package astPrinter
import (
- "ast";
+ "container/vector";
"flag";
"fmt";
+ "go/ast";
+ "go/token";
"io";
"os";
"strings";
"tabwriter";
- "token";
"unicode";
"utf8";
- "vector";
)
@@ -137,7 +137,7 @@ const (
type Printer struct {
// output
text io.Write;
-
+
// token printing
tprinter TokenPrinter;
@@ -146,7 +146,7 @@ type Printer struct {
full bool; // if false, print interface only; print all otherwise
// comments
- comments []*ast.Comment; // the list of unassociated comments
+ comments []*ast.Comment; // the list of unassociated comments
cindex int; // the current comment index
cpos token.Position; // the position of the next comment
@@ -163,7 +163,7 @@ type Printer struct {
// semantic state
state int; // current semantic state
laststate int; // state for last string
-
+
// expression precedence
prec int;
}
@@ -204,7 +204,7 @@ func (P *Printer) Init(text io.Write, tprinter TokenPrinter, comments []*ast.Com
P.nextComments();
// formatting parameters & semantic state initialized correctly by default
-
+
// expression precedence
P.prec = token.LowestPrec;
}
@@ -563,7 +563,7 @@ func (P *Printer) Signature(params, result []*ast.Field) {
return;
}
}
-
+
P.Parameters(result);
}
}
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++ {
diff --git a/usr/gri/pretty/docprinter.go b/usr/gri/pretty/docprinter.go
index 9672eb02f..9f053e4d4 100644
--- a/usr/gri/pretty/docprinter.go
+++ b/usr/gri/pretty/docprinter.go
@@ -7,17 +7,17 @@
package doc
import (
- "ast";
+ "container/vector";
"fmt";
+ "go/ast";
+ "go/token";
"io";
"once";
"regexp";
"sort";
"strings";
- "token";
"unicode";
"utf8";
- "vector";
"astprinter";
)
diff --git a/usr/gri/pretty/godoc.go b/usr/gri/pretty/godoc.go
index 54e0e1d61..2eb56a3d6 100644
--- a/usr/gri/pretty/godoc.go
+++ b/usr/gri/pretty/godoc.go
@@ -27,25 +27,25 @@
package main
import (
- "ast";
"bufio";
+ "container/vector";
"flag";
"fmt";
+ "go/ast";
+ "go/parser";
+ "go/token";
"http";
"io";
"log";
"net";
"once";
"os";
- "parser";
pathutil "path";
"sort";
"strings";
"tabwriter";
"template";
"time";
- "token";
- "vector";
"astprinter";
"comment";
diff --git a/usr/gri/pretty/pretty.go b/usr/gri/pretty/pretty.go
index 1c0f2445d..2db790d93 100644
--- a/usr/gri/pretty/pretty.go
+++ b/usr/gri/pretty/pretty.go
@@ -5,13 +5,13 @@
package main
import (
- "os";
+ "astprinter";
+ "compilation";
"flag";
+ "go/ast";
+ "os";
"platform";
- "compilation";
"tabwriter";
- "ast";
- "astprinter";
)
diff --git a/usr/gri/pretty/symboltable.go b/usr/gri/pretty/symboltable.go
index c0435ea03..910f2fc13 100644
--- a/usr/gri/pretty/symboltable.go
+++ b/usr/gri/pretty/symboltable.go
@@ -5,9 +5,9 @@
package SymbolTable
import (
- "utf8";
+ "container/vector";
"unicode";
- "vector";
+ "utf8";
)
diff --git a/usr/gri/pretty/typechecker.go b/usr/gri/pretty/typechecker.go
index b2dc4c9d3..4dde63b1f 100644
--- a/usr/gri/pretty/typechecker.go
+++ b/usr/gri/pretty/typechecker.go
@@ -5,9 +5,9 @@
package TypeChecker
import (
- "token";
- "scanner";
- "ast";
+ "go/ast";
+ "go/scanner";
+ "go/token";
)
diff --git a/usr/gri/pretty/untab.go b/usr/gri/pretty/untab.go
index 9b7c59629..026e5b2dd 100644
--- a/usr/gri/pretty/untab.go
+++ b/usr/gri/pretty/untab.go
@@ -5,10 +5,10 @@
package main
import (
- "os";
- "io";
"flag";
"fmt";
+ "io";
+ "os";
"tabwriter";
)