]> git.draconx.ca Git - gob-dx.git/blobdiff - src/tree.c
Release 0.92.2
[gob-dx.git] / src / tree.c
index 530145b355c463543aaca312a8a6c72510967b4f..d695b453185c9addf9f8147322b222a176b288f4 100644 (file)
 #include "tree.h"
 
 Node *
-new_ccode(int header, GString *cbuf)
+new_ccode(int cctype, char *cbuf, int line_no)
 {
        CCode *node = (CCode *)g_new(Node,1);
        node->type = CCODE_NODE;
-       node->header = header;
+       node->cctype = cctype;
        node->cbuf = cbuf;
+       node->line_no = line_no;
        return (Node *)node;
 }
 
@@ -45,12 +46,13 @@ new_class(char *otype, char *ptype, GList *nodes)
 }
 
 Node *
-new_type(int stars, char *name)
+new_type(int stars, char *name, char *postfix)
 {
        Type *node = (Type *)g_new(Node,1);
        node->type = TYPE_NODE;
        node->stars = stars;
        node->name = name;
+       node->postfix = postfix;
        return (Node *)node;
 }
 
@@ -76,11 +78,12 @@ new_funcarg(Type *atype, char *name, GList *checks)
 }
 
 Node *
-new_method(int scope, Type *mtype, char *otype, GList *gtktypes, char *id, GList *args, char *onerror, GString *cbuf, int line_no)
+new_method(int scope, int method, Type *mtype, char *otype, GList *gtktypes, char *id, GList *args, char *onerror, char *cbuf, int line_no, int ccode_line, gboolean vararg)
 {
        Method *node = (Method *)g_new(Node,1);
        node->type = METHOD_NODE;
        node->scope = scope;
+       node->method = method;
        node->mtype = mtype;
        node->otype = otype;
        node->gtktypes = gtktypes;
@@ -89,29 +92,36 @@ new_method(int scope, Type *mtype, char *otype, GList *gtktypes, char *id, GList
        node->onerror = onerror;
        node->cbuf = cbuf;
        node->line_no = line_no;
+       node->ccode_line = ccode_line;
+       node->vararg = vararg;
        return (Node *)node;
 }
 
 Node *
-new_argument(char *gtktype, GList *flags, char *name, GString *get, GString *set)
+new_argument(char *gtktype, Type *atype, GList *flags, char *name, char *get, int get_line, char *set, int set_line, int line_no)
 {
        Argument *node = (Argument *)g_new(Node,1);
        node->type = ARGUMENT_NODE;
        node->gtktype = gtktype;
+       node->atype = atype;
        node->flags = flags;
        node->name = name;
        node->get = get;
+       node->get_line = get_line;
        node->set = set;
+       node->set_line = set_line;
+       node->line_no = line_no;
        return (Node *)node;
 }
 
 Node *
-new_variable(int scope, Type *vtype, char *id)
+new_variable(int scope, Type *vtype, char *id, int line_no)
 {
        Variable *node = (Variable *)g_new(Node,1);
        node->type = VARIABLE_NODE;
        node->scope = scope;
        node->vtype = vtype;
        node->id = id;
+       node->line_no = line_no;
        return (Node *)node;
 }