Commit 12a9dfd6 authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

widl: Support SAFEARRAY(type) syntax.

parent f3d01fb0
...@@ -145,6 +145,7 @@ static UUID* parse_uuid(const char*u) ...@@ -145,6 +145,7 @@ static UUID* parse_uuid(const char*u)
yylval.num = strtoul(yytext, NULL, 0); yylval.num = strtoul(yytext, NULL, 0);
return aNUM; return aNUM;
} }
SAFEARRAY{ws}*/\( return tSAFEARRAY;
{cident} return kw_token(yytext); {cident} return kw_token(yytext);
\n line_number++; \n line_number++;
{ws} {ws}
......
...@@ -83,6 +83,7 @@ static ifref_t *make_ifref(type_t *iface); ...@@ -83,6 +83,7 @@ static ifref_t *make_ifref(type_t *iface);
static var_t *make_var(char *name); static var_t *make_var(char *name);
static func_t *make_func(var_t *def, var_t *args); static func_t *make_func(var_t *def, var_t *args);
static class_t *make_class(char *name); static class_t *make_class(char *name);
static type_t *make_safearray(void);
static type_t *reg_type(type_t *type, const char *name, int t); static type_t *reg_type(type_t *type, const char *name, int t);
static type_t *reg_types(type_t *type, var_t *names, int t); static type_t *reg_types(type_t *type, var_t *names, int t);
...@@ -179,6 +180,7 @@ static type_t std_uhyper = { "MIDL_uhyper" }; ...@@ -179,6 +180,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
%token tREQUESTEDIT %token tREQUESTEDIT
%token tRESTRICTED %token tRESTRICTED
%token tRETVAL %token tRETVAL
%token tSAFEARRAY
%token tSHORT %token tSHORT
%token tSIGNED %token tSIGNED
%token tSINGLE %token tSINGLE
...@@ -777,6 +779,7 @@ type: tVOID { $$ = make_tref(NULL, make_type(0, NULL)); } ...@@ -777,6 +779,7 @@ type: tVOID { $$ = make_tref(NULL, make_type(0, NULL)); }
| tSTRUCT aIDENTIFIER { $$ = make_tref(NULL, get_type(RPC_FC_STRUCT, $2, tsSTRUCT)); } | tSTRUCT aIDENTIFIER { $$ = make_tref(NULL, get_type(RPC_FC_STRUCT, $2, tsSTRUCT)); }
| uniondef { $$ = make_tref(NULL, $1); } | uniondef { $$ = make_tref(NULL, $1); }
| tUNION aIDENTIFIER { $$ = make_tref(NULL, find_type2($2, tsUNION)); } | tUNION aIDENTIFIER { $$ = make_tref(NULL, find_type2($2, tsUNION)); }
| tSAFEARRAY '(' type ')' { $$ = make_tref(NULL, make_safearray()); }
; ;
typedef: tTYPEDEF m_attributes type pident_list { typeref_t *tref = uniq_tref($3); typedef: tTYPEDEF m_attributes type pident_list { typeref_t *tref = uniq_tref($3);
...@@ -1139,6 +1142,11 @@ static class_t *make_class(char *name) ...@@ -1139,6 +1142,11 @@ static class_t *make_class(char *name)
return c; return c;
} }
static type_t *make_safearray(void)
{
return make_type(RPC_FC_FP, find_type("SAFEARRAY", 0));
}
#define HASHMAX 64 #define HASHMAX 64
static int hash_ident(const char *name) static int hash_ident(const char *name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment