diff --git a/tools/widl/parser.l b/tools/widl/parser.l index b4f2af55f84..c95277c2649 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -147,6 +147,15 @@ UUID *parse_uuid(const char *u) input_name = xstrdup(fname); } midl_echo[^\n]* yyless(9); yy_pop_state(); return tCPPQUOTE; +winrt[^\n]* { + if(import_stack_ptr) { + if(!winrt_mode) + error_loc("winrt IDL file imported in non-winrt mode\n"); + }else { + winrt_mode = TRUE; + } + yy_pop_state(); + } [^\n]* parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA; \" yy_push_state(QUOTE); cbufidx = 0; \" {