Continue to refactor functions

Now that we have immutable props, we can remove a bunch of 'helper'
functions.
This commit is contained in:
ridiculousfish
2021-10-21 14:28:39 -07:00
parent 7d7b930b08
commit 4a6d622733
7 changed files with 79 additions and 119 deletions

View File

@@ -451,7 +451,8 @@ int parser_t::get_lineno() const {
const wchar_t *parser_t::current_filename() const {
for (const auto &b : block_list) {
if (b.is_function_call()) {
return function_get_definition_file(b.function_name);
auto props = function_get_props(b.function_name);
return props ? props->definition_file : nullptr;
} else if (b.type() == block_type_t::source) {
return b.sourced_file;
}