diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:01:46 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:01:46 +0100 |
commit | 81662aa56b8ad2fa397b1d3e9dd3bb398c7d1798 (patch) | |
tree | ac788aa65d938f6fe1967863e5fe2296e6eacd7b /com.c | |
parent | 377822b957c442b2ff0882b8325033487037be2b (diff) |
print -> puts
Diffstat (limited to 'com.c')
-rw-r--r-- | com.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -53,10 +53,10 @@ static void compile_node(State *S, Chunk *ch, AstNode a) { char *name = l.vals[0].as.str; - if (0 == strcmp(name, "print")) { - CK(l.len == 2, "print requires exactly 1 argument"); + if (0 == strcmp(name, "puts")) { + CK(l.len == 2, "puts requires exactly 1 argument"); compile_node(S, ch, l.vals[1]); - chunk_wbc(S, ch, OP_PRINT); + chunk_wbc(S, ch, OP_PUTS); } else if (0 == strcmp(name, "set")) { CK(l.len == 3, "set requires exactly 2 arguments"); AstNode ident = l.vals[1]; @@ -174,7 +174,7 @@ int main(int argc, char **argv) { AstNode an = read(); compile_node(S, &ch, an); - chunk_wbc(S, &ch, OP_PRINT); + chunk_wbc(S, &ch, OP_PUTS); chunk_wbc(S, &ch, OP_RET); return runvm(S); |