]> Cypherpunks repositories - gostls13.git/commitdiff
- added names to result signatures to make it compile with gccgo
authorRobert Griesemer <gri@golang.org>
Thu, 25 Sep 2008 05:01:52 +0000 (22:01 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 25 Sep 2008 05:01:52 +0000 (22:01 -0700)
- adjusted the makefile to explicitly compile flag.go and fmt.go for gccgo

R=r
OCL=15822
CL=15822

usr/gri/pretty/Makefile.iant
usr/gri/pretty/parser.go

index 2f8f8c3c4f39f99b975947947a97713304bee8ed..4ee2bb71445ce3bc40c90ba5255d0850540b7b2b 100644 (file)
@@ -28,12 +28,18 @@ install: pretty
 clean:
        rm -f pretty *.o  *~
 
-pretty.o:      parser.o printer.o platform.o scanner.o
+pretty.o:      parser.o printer.o platform.o scanner.o flag.o
 
 parser.o:      ast.o scanner.o utils.o printer.o
 
 scanner.o:     utils.o platform.o
 
+flag.o:        fmt.o
+       $(GO) -O2 -c -g $(GOROOT)/src/lib/flag.go
+
+fmt.o:
+       $(GO) -O2 -c -g $(GOROOT)/src/lib/fmt.go
+
 .SUFFIXES:
 .SUFFIXES: .go .o
 
@@ -49,7 +55,8 @@ PRETTY_OBJS = \
        printer.o \
        scanner.o \
        utils.o \
-
+       flag.o \
+       fmt.o \
 
 pretty: $(PRETTY_OBJS)
        $(GO) $(LDFLAGS) -o $@ $(PRETTY_OBJS)
index 8089b561262a469e9a859dbda28f6dfe9ece2b47..7e3dda3ad3ce6b990195b16c3256b29158c2dcb8 100644 (file)
@@ -110,9 +110,9 @@ func (P *Parser) CloseScope() {
 // ----------------------------------------------------------------------------
 // Common productions
 
-func (P *Parser) TryType() (AST.Type, bool);
+func (P *Parser) TryType() (typ AST.Type, ok bool);
 func (P *Parser) ParseExpression() AST.Expr;
-func (P *Parser) TryStatement() (AST.Stat, bool);
+func (P *Parser) TryStatement() (stat AST.Stat, ok bool);
 func (P *Parser) ParseDeclaration() AST.Node;
 
 
@@ -444,7 +444,7 @@ func (P *Parser) ParsePointerType() *AST.PointerType {
 
 
 // Returns false if no type was found.
-func (P *Parser) TryType() (AST.Type, bool) {
+func (P *Parser) TryType() (typ_ AST.Type, ok_ bool) {
        P.Trace("Type (try)");
        
        var typ AST.Type = AST.NIL;
@@ -937,7 +937,7 @@ func (P *Parser) ParseControlFlowStat(tok int) {
 }
 
 
-func (P *Parser) ParseStatHeader(keyword int) (AST.Stat, AST.Expr, AST.Stat) {
+func (P *Parser) ParseStatHeader(keyword int) (init_ AST.Stat, expr_ AST.Expr, post_ AST.Stat) {
        P.Trace("StatHeader");
        
        var (
@@ -1150,7 +1150,7 @@ func (P *Parser) ParseSelectStat() {
 }
 
 
-func (P *Parser) TryStatement() (AST.Stat, bool) {
+func (P *Parser) TryStatement() (stat_ AST.Stat, ok_ bool) {
        P.Trace("Statement (try)");
        indent := P.indent;