Usermode/SpiderScript - Restructured namespace handling, fixed a few bytecode bugs
[tpg/acess2.git] / Usermode / Libraries / libspiderscript.so_src / ast.c
index 9532adb..d37dc31 100644 (file)
@@ -281,6 +281,8 @@ size_t AST_WriteNode(void *Buffer, size_t Offset, tAST_Node *Node)
        case NODETYPE_REAL:
                WRITE_REAL(Buffer, Offset, Node->Constant.Real);
                break;
+       case NODETYPE_NULL:
+               break;
        
        //default:
        //      fprintf(stderr, "AST_WriteNode: Unknown node type %i\n", Node->Type);
@@ -403,6 +405,7 @@ void AST_FreeNode(tAST_Node *Node)
        
        // Node types with no children
        case NODETYPE_NOP:      break;
+       case NODETYPE_NULL:     break;
        case NODETYPE_VARIABLE: break;
        case NODETYPE_CONSTANT: break;
        case NODETYPE_BREAK:
@@ -614,6 +617,16 @@ tAST_Node *AST_NewReal(tParser *Parser, double Value)
        return ret;
 }
 
+/**
+ * \brief Return a null value
+ */
+tAST_Node *AST_NewNull(tParser *Parser)
+{
+       tAST_Node       *ret = AST_int_AllocateNode(Parser, NODETYPE_NULL, 0);
+       
+       return ret;
+}
+
 /**
  * \brief Create a new variable reference node
  */

UCC git Repository :: git.ucc.asn.au