mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-23 00:01:16 -03:00
Functions to store nodes
Prior to this fix, functions stored a string representation of their contents. Switch them to storing a parsed source reference and the tnode of the contents. This is part of an effort to avoid reparsing a function's contents every time it executes.
This commit is contained in:
@@ -489,7 +489,7 @@ int parser_t::get_lineno() const {
|
||||
// If we are executing a function, we have to add in its offset.
|
||||
const wchar_t *function_name = is_function();
|
||||
if (function_name != NULL) {
|
||||
lineno += function_get_definition_offset(function_name);
|
||||
lineno += function_get_definition_lineno(function_name);
|
||||
}
|
||||
}
|
||||
return lineno;
|
||||
|
||||
Reference in New Issue
Block a user