mirror of
https://github.com/golang/go
synced 2024-11-22 06:54:39 -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\
|
world.go\
|
||||||
|
|
||||||
include ../../../Make.pkg
|
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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"./_obj/eval"
|
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"exp/eval"
|
||||||
"flag"
|
"flag"
|
||||||
"go/parser"
|
"go/parser"
|
||||||
"go/scanner"
|
"go/scanner"
|
||||||
"io"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ func main() {
|
|||||||
println(err.String())
|
println(err.String())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
file, err := parser.ParseFile(*filename, data, 0)
|
file, err := parser.ParseFile(*filename, data, nil, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println(err.String())
|
println(err.String())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@ -41,7 +41,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
_, err := code.Run()
|
_, err = code.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println(err.String())
|
println(err.String())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user