diff options
-rw-r--r-- | com.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -569,12 +569,10 @@ int main(int argc, char **argv) { AstNode an; memset(&an, 0, sizeof an); pcc_context_t *parser = pcc_create(infile); - int rv; - do { - astnode_free(&an); - rv = pcc_parse(parser, &an); + while (pcc_parse(parser, &an)) { compile_node(&com, an, 0); - } while (rv != 0); + astnode_free(&an); + } pcc_destroy(parser); } |