summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.go b/src/main.go
index f68a5f1..f8280f8 100644
--- a/src/main.go
+++ b/src/main.go
@@ -246,7 +246,8 @@ func parse(tokens[]Token) []Operation {
}
if op.name == "" {
- panic ("invalid word")
+ fmt.Fprintf(os.Stderr, "Undefined word `%s` at %d:%d\n", tokens[i].str, tokens[i].line, tokens[i].offset)
+ os.Exit(1)
}
ops = append(ops, op)