Commit 374321f8 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

widl: Remove aNAMESPACE token from the lexer.

parent f5b7a76b
......@@ -38,7 +38,6 @@ void pop_import(void);
#define parse_only import_stack_ptr
int is_type(const char *name);
int is_namespace(const char *name);
int do_warning(char *toggle, warning_list_t *wnum);
int is_warning_enabled(int warning);
......
......@@ -468,7 +468,7 @@ static int kw_token(const char *kw)
return kwp->token;
}
parser_lval.str = xstrdup(kw);
return is_type(kw) ? aKNOWNTYPE : is_namespace(kw) ? aNAMESPACE : aIDENTIFIER;
return is_type(kw) ? aKNOWNTYPE : aIDENTIFIER;
}
static int attr_token(const char *kw)
......
......@@ -154,7 +154,7 @@ static typelib_t *current_typelib;
}
%token <str> aIDENTIFIER aPRAGMA
%token <str> aKNOWNTYPE aNAMESPACE
%token <str> aKNOWNTYPE
%token <num> aNUM aHEXNUM
%token <dbl> aDOUBLE
%token <str> aSTRING aWSTRING aSQSTRING
......@@ -887,8 +887,7 @@ int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); }
;
namespace_pfx:
aNAMESPACE '.' { $$ = find_namespace_or_error(&global_namespace, $1); }
| namespace_pfx aNAMESPACE '.' { $$ = find_namespace_or_error($1, $2); }
aIDENTIFIER '.' { $$ = find_namespace_or_error(&global_namespace, $1); }
| namespace_pfx aIDENTIFIER '.' { $$ = find_namespace_or_error($1, $2); }
;
......@@ -919,7 +918,6 @@ apicontract_def: attributes apicontract '{' '}' semicolon_opt
;
namespacedef: tNAMESPACE aIDENTIFIER { $$ = $2; }
| tNAMESPACE aNAMESPACE { $$ = $2; }
;
class_interfaces: { $$ = NULL; }
......@@ -2061,13 +2059,6 @@ int is_type(const char *name)
return find_type(name, current_namespace, 0) != NULL;
}
int is_namespace(const char *name)
{
if (!winrt_mode) return 0;
return find_sub_namespace(current_namespace, name) != NULL ||
find_sub_namespace(&global_namespace, name) != NULL;
}
type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t)
{
type_t *tp;
......
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