Commit fa860653 authored by Evan Shaw's avatar Evan Shaw Committed by Russ Cox

exp/eval: Fix example and add target to Makefile

R=rsc
CC=golang-dev
https://golang.org/cl/901042
parent ae729a43
......@@ -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)
......
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