diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:23:03 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:23:03 +0100 |
commit | d6ce4e22ad9b98ab06812506f5bec2d4226ee7d2 (patch) | |
tree | 8d8c0435856faf871e7b5eff7d38a3c88da04051 /com.c | |
parent | 81662aa56b8ad2fa397b1d3e9dd3bb398c7d1798 (diff) |
mandelbrot
Diffstat (limited to 'com.c')
-rw-r--r-- | com.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -57,6 +57,10 @@ static void compile_node(State *S, Chunk *ch, AstNode a) { CK(l.len == 2, "puts requires exactly 1 argument"); compile_node(S, ch, l.vals[1]); chunk_wbc(S, ch, OP_PUTS); + } else if (0 == strcmp(name, "print")) { + CK(l.len == 2, "print requires exactly 1 argument"); + compile_node(S, ch, l.vals[1]); + chunk_wbc(S, ch, OP_PRINT); } else if (0 == strcmp(name, "set")) { CK(l.len == 3, "set requires exactly 2 arguments"); AstNode ident = l.vals[1]; |