X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/4c9cb9b99991c36920bd17e366e2128d1b22eb6e..2255b3d84eeb947d4c065332f16e410ae4704c63:/src/tree.h diff --git a/src/tree.h b/src/tree.h index 348cb8a..474579e 100644 --- a/src/tree.h +++ b/src/tree.h @@ -41,7 +41,7 @@ typedef struct _CCode CCode; struct _CCode { int type; int header; - GString *cbuf; + char *cbuf; int line_no; }; @@ -58,6 +58,7 @@ struct _Type { int type; int stars; char *name; + char *postfix; }; enum { @@ -92,16 +93,24 @@ struct _Argument { char *gtktype; GList *flags; char *name; - GString *get; + char *get; int get_line; - GString *set; + char *set; int set_line; + int line_no; }; /*scope type*/ enum { + NO_SCOPE, PUBLIC_SCOPE, PRIVATE_SCOPE, + PROTECTED_SCOPE, +}; + +/* method type */ +enum { + REGULAR_METHOD, INIT_METHOD, CLASS_INIT_METHOD, VIRTUAL_METHOD, @@ -113,16 +122,18 @@ enum { typedef struct _Method Method; struct _Method { int type; - int scope; + int scope; /* scope type */ + int method; /* method type */ Type *mtype; char *otype; /*for override methods*/ GList *gtktypes; /*GTK types for a signal*/ char *id; GList *args; char *onerror; - GString *cbuf; + char *cbuf; int line_no; int ccode_line; + int vararg; }; typedef struct _Variable Variable; @@ -131,6 +142,7 @@ struct _Variable { int scope; Type *vtype; char *id; + int line_no; }; union _Node { @@ -144,13 +156,13 @@ union _Node { Variable variable; }; -Node *new_ccode(int header, GString *cbuf, int line_no); +Node *new_ccode(int header, char *cbuf, int line_no); Node *new_class(char *otype, char *ptype, GList *nodes); -Node *new_type(int stars, char *name); +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, Type *mtype, char *otype, GList *gtktypes, char *id, GList *args, char *onerror, GString *cbuf,int line_no,int ccode_line); -Node *new_argument(char *gtktype, GList *flags, char *name, GString *get, int get_line, GString *set, int set_line); -Node *new_variable(int scope, Type *vtype, char *id); +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, 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); #endif