]> git.draconx.ca Git - gob-dx.git/blobdiff - src/tree.h
Release 0.93.1
[gob-dx.git] / src / tree.h
index 814ce027825f720287460c3d7a7d0091b5f7ade8..91fae2325c8952db7e841498ad22efa45de96e8f 100644 (file)
@@ -35,12 +35,22 @@ enum {
        VARIABLE_NODE
 };
 
+/* for ccode type */
+enum {
+       A_CCODE,
+       AT_CCODE,
+       C_CCODE,
+       H_CCODE,
+       HT_CCODE,
+       PH_CCODE
+};
+
 typedef union _Node Node;
 
 typedef struct _CCode CCode;
 struct _CCode {
        int type;
-       int header;
+       int cctype;
        char *cbuf;
        int line_no;
 };
@@ -106,7 +116,7 @@ enum {
        NO_SCOPE,
        PUBLIC_SCOPE,
        PRIVATE_SCOPE,
-       PROTECTED_SCOPE,
+       PROTECTED_SCOPE
 };
 
 /* method type */
@@ -128,13 +138,14 @@ struct _Method {
        Type *mtype;
        char *otype; /*for override methods*/
        GList *gtktypes; /*GTK types for a signal*/
+       GList *flags; /* GTK_RUN_* flags for a signal */
        char *id;
        GList *args;
        char *onerror;
        char *cbuf;
        int line_no;
        int ccode_line;
-       int vararg;
+       gboolean vararg;
 };
 
 typedef struct _Variable Variable;
@@ -144,6 +155,11 @@ struct _Variable {
        Type *vtype;
        char *id;
        int line_no;
+       char *destructor;
+       int destructor_line;
+       gboolean destructor_simple;
+       char *initializer;
+       int initializer_line;
 };
 
 union _Node {
@@ -157,13 +173,23 @@ union _Node {
        Variable variable;
 };
 
-Node *new_ccode(int header, char *cbuf, int line_no);
+Node *new_ccode(int cctype, char *cbuf, int line_no);
 Node *new_class(char *otype, char *ptype, GList *nodes);
 Node *new_type(int stars, char *name, char *postfix);
 Node *new_check(int chtype, char *number);
 Node *new_funcarg(Type *atype, char *name, GList *checks);
-Node *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, int vararg);
-Node *new_argument(char *gtktype, Type *atype, GList *flags, char *name, char *get, int get_line, char *set, int set_line, int line_no);
-Node *new_variable(int scope, Type *vtype, char *id,int line_no);
+Node *new_method(int scope, int method, Type *mtype, char *otype,
+                GList *gtktypes, GList *flags, char *id, GList *args,
+                char *onerror, char *cbuf, int line_no, int ccode_line,
+                gboolean vararg);
+Node *new_argument(char *gtktype, Type *atype, GList *flags, char *name,
+                  char *get, int get_line, char *set, int set_line,
+                  int line_no);
+Node *new_variable(int scope, Type *vtype, char *id, int line_no,
+                  char *destructor, int destructor_line,
+                  gboolean destructor_simple,
+                  char *initializer, int initializer_line);
+
+Type *copy_type(Type *type);
 
 #endif