Automatically update the string constants when a builtin module changes.

This commit is contained in:
Bob Nystrom
2015-09-13 10:03:02 -07:00
parent e1cf8e22c3
commit f36a795534
15 changed files with 455 additions and 441 deletions

View File

@ -1,7 +1,9 @@
The Wren scripts in this directory get converted to C string literals and then
inserted into their respective .c files so that the interpreter can load them
directly without having to do any file IO.
The Wren scripts in this directory get converted to C string literals into files
with a `.wren.inc` extension. Those are then `#includ`ed into their respective
`.c` files so that the interpreter can load them directly without having to do
any file IO.
The script that does this copying is `script/generate_builtins.py`.
The script that does this translation is `script/wren_to_c_string.py`.
You can invoke using `make builtin`.
When any of the ".wren" files in here are changed, the Makefile automatically
updates the generated C headers.