mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-16 10:11:14 -03:00
Wrap up source code and a parse tree into a new type parsed_source_ref_t
This will make it unnecessary to carry around the parse tree and source separately, and enable some simplifications.
This commit is contained in:
@@ -3316,9 +3316,10 @@ static int read_ni(int fd, const io_chain_t &io) {
|
||||
}
|
||||
|
||||
parse_error_list_t errors;
|
||||
parse_node_tree_t tree;
|
||||
if (!parse_util_detect_errors(str, &errors, false /* do not accept incomplete */, &tree)) {
|
||||
parser.eval(str, io, TOP, std::move(tree));
|
||||
parsed_source_ref_t pstree;
|
||||
if (!parse_util_detect_errors(str, &errors, false /* do not accept incomplete */,
|
||||
&pstree)) {
|
||||
parser.eval(pstree, io, TOP);
|
||||
} else {
|
||||
wcstring sb;
|
||||
parser.get_backtrace(str, errors, sb);
|
||||
|
||||
Reference in New Issue
Block a user