Commit bc641d1e authored by Robert Griesemer's avatar Robert Griesemer

- more robust TokenString implementation

R=r
OCL=17319
CL=17319
parent 71696ac0
......@@ -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)
......@@ -201,7 +201,7 @@ export func TokenString(tok int) string {
case VAR: return "var";
}
panic("UNREACHABLE");
return "token(" + Utils.IntToString(tok, 10) + ")";
}
......
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