io.printf, please dont look at it

This commit is contained in:
2026-03-14 11:24:51 +01:00
parent 100b752eee
commit 4a60c1fc12
6 changed files with 91 additions and 149 deletions

View File

@@ -165,7 +165,11 @@ impl Analyzer {
{
// its a function (defined/builtin/extern)
if let Some(arity) = self.functions.get(&callee_name.lexeme) {
if *arity >= 0 && *arity != args.len() as i32 {
if *arity >= 0
&& *arity != args.len() as i32
&& callee_name.lexeme != "io.printf"
// TODO: disgusting hack
{
return error!(
&paren.loc,
format!("expected {} arguments, got {}", arity, args.len())