Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New "nubake" feature: easier baking into classes.
nubake accepts three new options: --method <methodname> --class <classname> --category <categoryname> When these are provided, nubake produces a source file that adds the named category to the named class. The category adds a method that evaluates the baked Nu code and returns the result. The purpose of this is to bake in code that can be evaluated from Nu. The code is evaluated in the main Nu parser's context so that macros and other objects can be made available to subsequent Nu code. Example: % nubake server.nu --method macros --category Baked --class MyServer --output MyServer+Baked.m
- Loading branch information
Showing
1 changed file
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters