aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index eeee6ab..f308378 100644
--- a/main.go
+++ b/main.go
@@ -16,8 +16,10 @@ func main() {
fmt.Print(promt)
for scanner.Scan() {
line := scanner.Text()
- result, ok := Parse(line)
- if ok {
+ result, ok, err := Parse(line)
+ if err != nil {
+ fmt.Printf("error: %v\n\n", err)
+ } else if ok {
fmt.Printf("%v\n\n", result)
}
fmt.Print(promt)