1
0
mirror of https://github.com/golang/go synced 2024-11-22 01:04:40 -07:00

exp/eval: Fix example and add target to Makefile

R=rsc
CC=golang-dev
https://golang.org/cl/901042
This commit is contained in:
Evan Shaw 2010-04-11 12:42:19 -07:00 committed by Russ Cox
parent ae729a433f
commit fa860653ae
2 changed files with 10 additions and 4 deletions

View File

@ -21,3 +21,9 @@ GOFILES=\
world.go\
include ../../../Make.pkg
main.$O: main.go $(pkgdir)/$(TARG).a
$(QUOTED_GOBIN)/$(GC) $<
eval: main.$O
$(QUOTED_GOBIN)/$(LD) -o $@ $<

View File

@ -5,12 +5,12 @@
package main
import (
"./_obj/eval"
"bufio"
"exp/eval"
"flag"
"go/parser"
"go/scanner"
"io"
"io/ioutil"
"os"
)
@ -25,7 +25,7 @@ func main() {
println(err.String())
os.Exit(1)
}
file, err := parser.ParseFile(*filename, data, 0)
file, err := parser.ParseFile(*filename, data, nil, 0)
if err != nil {
println(err.String())
os.Exit(1)
@ -41,7 +41,7 @@ func main() {
}
os.Exit(1)
}
_, err := code.Run()
_, err = code.Run()
if err != nil {
println(err.String())
os.Exit(1)