diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-08-16 17:21:01 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-08-16 17:21:01 -0400 |
| commit | c72b0406a32ffc3f04324f7b6c321486762fca41 (patch) | |
| tree | 244e51c858890ea2ffb8c74a2c33c81b79de376e /src/compile.c | |
| parent | 849fd423a759edf1b58b548a6148c177a6f8cd71 (diff) | |
Improved parsing and prefix/suffix matching using a `remainder`
parameter
Diffstat (limited to 'src/compile.c')
| -rw-r--r-- | src/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile.c b/src/compile.c index 1795bb38..eb250d74 100644 --- a/src/compile.c +++ b/src/compile.c @@ -1513,7 +1513,7 @@ static Text_t _compile_statement(env_t *env, ast_t *ast) struct { const char *name; binding_t *b; } *entry = closed_vars.entries.data + closed_vars.entries.stride*i; if (entry->b->type->tag == ModuleType) continue; - if (Text$starts_with(entry->b->code, Text("userdata->"))) { + if (Text$starts_with(entry->b->code, Text("userdata->"), NULL)) { Table$str_set(defer_env->locals, entry->name, entry->b); } else { Text_t defer_name = Texts("defer$", String(++defer_id), "$", entry->name); @@ -4254,7 +4254,7 @@ Text_t compile_function(env_t *env, Text_t name_code, ast_t *ast, Text_t *static definition = Texts(definition, wrapper); } else if (cache && cache->tag == Int) { assert(args); - OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str)); + OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str), NULL); Text_t pop_code = EMPTY_TEXT; if (cache->tag == Int && !cache_size.is_none && cache_size.value > 0) { // FIXME: this currently just deletes the first entry, but this should be more like a |
