Added assert keyword, with re-routable print and assert outputs

This commit is contained in:
2022-08-07 12:26:04 +01:00
parent 7ff232c814
commit d7fda480fd
7 changed files with 110 additions and 19 deletions

View File

@@ -29,6 +29,8 @@ void writeCompiler(Compiler* compiler, Node* node) {
//determine node type
switch(node->type) {
//TODO: more types, like variables, etc.
case NODE_LITERAL: {
//ensure the literal is in the cache
int index = findLiteralIndex(&compiler->literalCache, node->atomic.literal);