diff options
author | c | 2024-03-16 10:01:31 -0400 |
---|---|---|
committer | c | 2024-03-16 10:01:31 -0400 |
commit | 8848b46c2873faa019f96b0194237745a80f78f2 (patch) | |
tree | a3b9be7bdedca61979fa24691f974b98bc549dfc /src/include | |
parent | 099fd363f7972ad7e1c48f5fd9ab83aa38a40ea2 (diff) |
Can now print first defined string variable.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/doer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/doer.h b/src/include/doer.h index 429aa02..00c3c19 100644 --- a/src/include/doer.h +++ b/src/include/doer.h @@ -6,7 +6,6 @@ // Points to a part of the AST the doer wishes to remember. typedef struct TARGET { -// char* name; // The name of the target (unique). tree_t* tree; // The tree to which the target refers. struct TARGET* nxt; // The next target in the list. } target_t; @@ -49,10 +48,14 @@ typedef struct BLINF { void doer_add_target(doer_t* doer, target_t* target); + +// Given a tree, evaluate it to a string (or type error). +char* doer_eval_str(doer_t* doer); + // Built-in functions. // `die`: dies. Does not accept any arguments, returns int (if a tree falls in // the forest, but it burns down before anyone can hear it, did it ever make a -// sound at all?) +// sound at all?) TODO: Make this actually clean up afterwards. void blin_die(doer_t* tree); // `print`: print a string. void blin_print(doer_t* tree); |