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:
parent
ae729a433f
commit
fa860653ae
@ -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 $@ $<
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user