diff options
author | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | 2015-07-07 16:04:18 +0900 |
---|---|---|
committer | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | 2015-07-07 16:04:18 +0900 |
commit | cba36c9f9e16a405e6e866c7345643ee9d9a5908 (patch) | |
tree | 82080832c8b39306e7dae73c4b5397d72bfc747b /expr.go | |
parent | fc02d674ac37674f3cec520e9d2067e697ec1ff0 (diff) | |
download | kati-cba36c9f9e16a405e6e866c7345643ee9d9a5908.tar.gz |
fix err_unterminated_func.mk
Diffstat (limited to 'expr.go')
-rw-r--r-- | expr.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |