aboutsummaryrefslogtreecommitdiff
path: root/expr.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-07-07 16:04:18 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-07-07 16:04:18 +0900
commitcba36c9f9e16a405e6e866c7345643ee9d9a5908 (patch)
tree82080832c8b39306e7dae73c4b5397d72bfc747b /expr.go
parentfc02d674ac37674f3cec520e9d2067e697ec1ff0 (diff)
downloadkati-cba36c9f9e16a405e6e866c7345643ee9d9a5908.tar.gz
fix err_unterminated_func.mk
Diffstat (limited to 'expr.go')
-rw-r--r--expr.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/expr.go b/expr.go
index 5ed645d..9778de4 100644
--- a/expr.go
+++ b/expr.go
@@ -25,6 +25,7 @@ import (
)
var (
+ errEndOfInput = errors.New("unexpected end of input")
errNotLiteral = errors.New("valueNum: not literal")
)
@@ -392,7 +393,8 @@ Loop:
}
exp = appendStr(exp, in[b:i], op.alloc)
if i == len(in) && term != nil {
- return exp, i, fmt.Errorf("parse: unexpected end of input: %q %d [%q]", in, i, term)
+ logf("parse: unexpected end of input: %q %d [%q]", in, i, term)
+ return exp, i, errEndOfInput
}
return compactExpr(exp), i, nil
}
@@ -612,6 +614,9 @@ func parseFunc(f mkFunc, in []byte, s int, term []byte, funcName string, alloc b
}
v, n, err := parseExpr(in[i:], term, op)
if err != nil {
+ if err == errEndOfInput {
+ return nil, 0, fmt.Errorf("*** unterminated call to function `%s': missing `)'.", funcName)
+ }
return nil, 0, err
}
v = concatLine(v)