diff options
author | 2014-07-24 14:41:15 -0700 | |
---|---|---|
committer | 2014-07-24 14:41:15 -0700 | |
commit | 5e60efefbfc847afb0521087a36518abce5a476b (patch) | |
tree | d2c2c87e039a99ccc0401f7f4156efa76182ded1 /reader.cpp | |
parent | f6a89d13c21f54641410f093391328953d7cdb09 (diff) |
Allow parse_util_detect_errors to treat incomplete strings as errors
Fixes bug where sourcing a file with an unclosed quote would not have a
backtrace
Diffstat (limited to 'reader.cpp')
-rw-r--r-- | reader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2544,7 +2544,7 @@ int reader_shell_test(const wchar_t *b) bstr.push_back(L'\n'); parse_error_list_t errors; - int res = parse_util_detect_errors(bstr, &errors); + int res = parse_util_detect_errors(bstr, &errors, true /* do accept incomplete */); if (res & PARSER_TEST_ERROR) { @@ -4220,7 +4220,7 @@ static int read_ni(int fd, const io_chain_t &io) } parse_error_list_t errors; - if (! parse_util_detect_errors(str, &errors)) + if (! parse_util_detect_errors(str, &errors, false /* do not accept incomplete */)) { parser.eval(str, io, TOP); } |