mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-27 20:31:17 -03:00
parser: try to avoid some strings being copied
This commit is contained in:
@@ -1135,7 +1135,7 @@ const parse_node_t *parse_node_tree_t::get_child(const parse_node_t &parent, nod
|
||||
return result;
|
||||
}
|
||||
|
||||
parsed_source_ref_t parse_source(wcstring src, parse_tree_flags_t flags, parse_error_list_t *errors,
|
||||
parsed_source_ref_t parse_source(const wcstring &src, parse_tree_flags_t flags, parse_error_list_t *errors,
|
||||
parse_token_type_t goal) {
|
||||
parse_node_tree_t tree;
|
||||
if (!parse_tree_from_string(src, flags, &tree, errors, goal)) return {};
|
||||
|
||||
Reference in New Issue
Block a user