From 46bb5e624d8df35c076f93d6f14ddc98191406b2 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Wed, 9 Jul 2014 03:34:12 -0400 Subject: [PATCH] compiler/libec: Work around to improve debugging in Win32Interface.ec - Recognizing WINAPI as EXT_DECL and WINUSERAPI, BOOL as TYPE_NAME --- compiler/bootstrap/libec/bootstrap/ast.c | 9 +++++++++ compiler/libec/src/ast.ec | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/compiler/bootstrap/libec/bootstrap/ast.c b/compiler/bootstrap/libec/bootstrap/ast.c index d88eff8..ea6b9bd 100644 --- a/compiler/bootstrap/libec/bootstrap/ast.c +++ b/compiler/bootstrap/libec/bootstrap/ast.c @@ -91,6 +91,8 @@ extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSp extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next; +extern unsigned int inIDE; + extern int targetBits; extern int targetPlatform; @@ -3134,6 +3136,13 @@ return symbol; int CheckType(const char * text) { +if(inIDE) +{ +if(!strcmp(text, "WINAPI")) +return EXT_DECL; +else if(!strcmp(text, "BOOL") || !strcmp(text, "WINUSERAPI")) +return TYPE_NAME; +} if(FindTemplateTypeParameter(curContext, text)) { return TYPE_NAME; diff --git a/compiler/libec/src/ast.ec b/compiler/libec/src/ast.ec index 6b696f8..9b56913 100644 --- a/compiler/libec/src/ast.ec +++ b/compiler/libec/src/ast.ec @@ -1985,6 +1985,16 @@ int CheckType(const char * text) #ifdef _TIMINGS Time startTime = GetTime(); #endif + + if(inIDE) + { + // Help out the Debugger with Windows files until we improve the parser + if(!strcmp(text, "WINAPI")) + return EXT_DECL; + else if(!strcmp(text, "BOOL") || !strcmp(text, "WINUSERAPI")) + return TYPE_NAME; + } + if(FindTemplateTypeParameter(curContext, text)) { #ifdef _TIMINGS -- 1.8.3.1