Jacek Caban : widl: Added widl-specific winrt pragma.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 3 14:52:36 CDT 2015


Module: wine
Branch: master
Commit: a9503166fe3c64051cd9b4f18f1331e01102afc2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a9503166fe3c64051cd9b4f18f1331e01102afc2

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Aug  3 14:38:27 2015 +0200

widl: Added widl-specific winrt pragma.

---

 tools/widl/parser.l | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index b4f2af5..c95277c 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);
                         }
 <PP_PRAGMA>midl_echo[^\n]*  yyless(9); yy_pop_state(); return tCPPQUOTE;
+<PP_PRAGMA>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();
+                        }
 <PP_PRAGMA>[^\n]*       parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
 <INITIAL,ATTR>\"	yy_push_state(QUOTE); cbufidx = 0;
 <QUOTE>\"		{




More information about the wine-cvs mailing list