Commit Graph

3 Commits

Author SHA1 Message Date
Bob Nystrom
83e062cc71 feat: add foreign method binding for Meta class and restrict foreign lookup to core module
Add foreign static eval(source) method to Meta class in meta.wren and implement wrenBindMetaForeignMethod in wren_meta.c to handle its binding. Change the implicit module name from "main" to "core" in wren_vm.c and restrict foreign method lookup to only the "core" module, enabling Meta foreign methods to be resolved alongside IO methods. Relax the IO foreign method binder to return NULL instead of asserting for non-IO classes, allowing fallback to other library binders.
2015-03-26 03:20:26 +00:00
Gavin Schulz
ab52c46a28 chore: remove unused stdio, wren_value, and wren_vm includes from wren_meta.h
The wren_meta.h header included <stdio.h>, "wren_value.h", and "wren_vm.h"
which were not required for its declarations. These headers are already
included transitively through "wren.h" and "wren_common.h", making the
explicit includes redundant. Removing them reduces unnecessary
dependencies and potential circular inclusion issues.
2015-03-25 06:30:53 +00:00
Gavin Schulz
c8fa7e619f feat: add Meta library with eval function for inline code interpretation 2015-03-22 21:16:53 +00:00