Commit 2a19d7dc authored by Robert Griesemer's avatar Robert Griesemer

- added names to result signatures to make it compile with gccgo

- adjusted the makefile to explicitly compile flag.go and fmt.go for gccgo

R=r
OCL=15822
CL=15822
parent bcd07252
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment