Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "bufio" | |
8 "exp/eval" | 9 "exp/eval" |
9 "bufio" | |
10 "flag" | 10 "flag" |
11 "go/parser" | 11 "go/parser" |
12 "go/scanner" | 12 "go/scanner" |
13 "io/ioutil" | 13 "io/ioutil" |
14 "os" | 14 "os" |
15 ) | 15 ) |
16 | 16 |
17 var filename = flag.String("f", "", "file to run") | 17 var filename = flag.String("f", "", "file to run") |
18 | 18 |
19 func main() { | 19 func main() { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 v, err := code.Run() | 82 v, err := code.Run() |
83 if err != nil { | 83 if err != nil { |
84 println(err.String()) | 84 println(err.String()) |
85 continue | 85 continue |
86 } | 86 } |
87 if v != nil { | 87 if v != nil { |
88 println(v.String()) | 88 println(v.String()) |
89 } | 89 } |
90 } | 90 } |
91 } | 91 } |
LEFT | RIGHT |