diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-01 15:43:24 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-01 15:43:24 -0500 |
| commit | 90548ebb33ea69c6c9e0962d8bab6d3ec72ac90f (patch) | |
| tree | 575747915cf0fb61019cc238dca72c44c6cf1c22 /compile.c | |
| parent | e81b7b998a6218f524d5d6c41e98e07d1f5b10b4 (diff) | |
For debugging purposes, show qualified name (`Foo.baz()`) in function
text
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4213,7 +4213,10 @@ CORD compile_function(env_t *env, ast_t *ast, CORD *staticdefs) } } - CORD text = CORD_all("func ", Match(fndef->name, Var)->name, "("); + CORD qualified_name = Match(fndef->name, Var)->name; + if (env->namespace && env->namespace->parent && env->namespace->name) + qualified_name = CORD_all(env->namespace->name, ".", qualified_name); + CORD text = CORD_all("func ", qualified_name, "("); for (arg_ast_t *arg = fndef->args; arg; arg = arg->next) { text = CORD_cat(text, type_to_cord(get_arg_ast_type(env, arg))); if (arg->next) text = CORD_cat(text, ", "); |
