feat: switch method signatures to parenthesized parameter notation and update error messages

The method signature format has been changed from space-counted arity (e.g., "== ") to explicit parenthesized parameter lists (e.g., "==(_)"). This required updating the MAX_METHOD_SIGNATURE calculation to account for parentheses and parameter separators, replacing the old copyName helper with a new Signature struct and SignatureType enum, and rewriting the methodNotFound error message to display the full signature string instead of reconstructing arity from trailing spaces. All core method registrations in wren_core.c, wren_io.c, and corresponding test expectations have been updated to use the new signature format.
This commit is contained in:
Bob Nystrom
2015-02-27 05:56:15 +00:00
parent a24f51d4af
commit 94f34367f9
15 changed files with 343 additions and 253 deletions
@@ -4,4 +4,4 @@ class Foo {
class Bar is Foo {}
Bar.methodOnFoo // expect runtime error: Bar metaclass does not implement method 'methodOnFoo' with 0 arguments.
Bar.methodOnFoo // expect runtime error: Bar metaclass does not implement 'methodOnFoo'.