X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/d52e64e92557f0b6d7704077ec175c88fa7ca243..8445442abc02fc325a9ce228759403113583818c:/src/parse.y diff --git a/src/parse.y b/src/parse.y index 5c8cc98..1831ad0 100644 --- a/src/parse.y +++ b/src/parse.y @@ -70,6 +70,7 @@ static char *onerror = NULL; static char *defreturn = NULL; static GList *gtktypes = NULL; +static char *signal_name=NULL; static Property *property = NULL; @@ -202,6 +203,13 @@ push_function (int scope, int method, char *oid, char *id, } else c_cbuf = NULL; + if (signal_name == NULL ) + { + GString * buffer=g_string_new(""); + g_string_printf(buffer, "\"%s\"", id); + signal_name = buffer->str; + g_string_free(buffer, FALSE); + } node = node_new (METHOD_NODE, "scope", scope, "method", method, @@ -210,6 +218,7 @@ push_function (int scope, int method, char *oid, char *id, "gtktypes:steal", gtktypes, "flags:steal", flags, "id:steal", id, + "signal_name:steal", signal_name, "args:steal", funcargs, "funcattrs:steal", funcattrs, "onerror:steal", onerror, @@ -229,8 +238,8 @@ push_function (int scope, int method, char *oid, char *id, above */ c_cbuf?FALSE:TRUE); gtktypes = NULL; + signal_name = NULL; funcargs = NULL; - funcattrs = NULL; onerror = NULL; defreturn = NULL; @@ -696,7 +705,7 @@ ensure_property (void) %token CCODE CTCODE ADCODE HTCODE PHCODE HCODE ACODE ATCODE STRING %token PUBLIC PRIVATE PROTECTED CLASSWIDE PROPERTY ARGUMENT %token VIRTUAL SIGNAL OVERRIDE -%token NICK BLURB MAXIMUM MINIMUM DEFAULT_VALUE ERROR FLAGS TYPE +%token NAME NICK BLURB MAXIMUM MINIMUM DEFAULT_VALUE ERROR FLAGS TYPE %token FLAGS_TYPE ENUM_TYPE PARAM_TYPE BOXED_TYPE OBJECT_TYPE %% @@ -1369,7 +1378,13 @@ anyval: numtok { $$ = $1; } | string { $$ = $1; } ; -param_spec_value: NICK '=' string { +param_spec_value: NAME '=' string { + ensure_property (); + node_set ((Node *)property, + "canonical_name:steal", gob_str_delete_quotes($3), + NULL); + } + | NICK '=' string { ensure_property (); node_set ((Node *)property, "nick:steal", $3, @@ -1683,6 +1698,10 @@ fullsigtype: scope TOKEN sigtype { sigtype: TOKEN '(' tokenlist ')' { gtktypes = g_list_prepend(gtktypes, debool ($1)); } + | TOKEN STRING '(' tokenlist ')' { + gtktypes = g_list_prepend(gtktypes, debool ($1)); + signal_name=$2; + } ; tokenlist: tokenlist ',' TOKEN {