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:
ridiculousfish
2018-02-09 21:53:06 -08:00
parent ba7b8a9584
commit de23ce6ac1
10 changed files with 56 additions and 66 deletions

View File

@@ -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;