- more robust TokenString implementation

R=r
OCL=17319
CL=17319
This commit is contained in:
Robert Griesemer 2008-10-16 15:28:36 -07:00
parent 71696ac048
commit bc641d1e9c
2 changed files with 14 additions and 17 deletions

View File

@ -8,6 +8,19 @@ GO = /home/iant/go/bin/gccgo
LDFLAGS = -Wl,-R,/home/iant/go/lib
PRETTY_OBJS = \
node.o \
pretty.o \
parser.o \
platform.o \
printer.o \
scanner.o \
utils.o \
flag.o \
fmt.o \
pretty: $(PRETTY_OBJS)
$(GO) $(LDFLAGS) -o $@ $(PRETTY_OBJS)
test: pretty
pretty -s *.go
@ -47,19 +60,3 @@ fmt.o:
.go.o:
$(GO) -O2 -c -g $<
PRETTY_OBJS = \
node.o \
pretty.o \
parser.o \
platform.o \
printer.o \
scanner.o \
utils.o \
flag.o \
fmt.o \
pretty: $(PRETTY_OBJS)
$(GO) $(LDFLAGS) -o $@ $(PRETTY_OBJS)

View File

@ -201,7 +201,7 @@ export func TokenString(tok int) string {
case VAR: return "var";
}
panic("UNREACHABLE");
return "token(" + Utils.IntToString(tok, 10) + ")";
}