compiler/libec: Work around to improve debugging in Win32Interface.ec
authorJerome St-Louis <jerome@ecere.com>
Wed, 9 Jul 2014 07:34:12 +0000 (03:34 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 9 Jul 2014 07:34:12 +0000 (03:34 -0400)
- Recognizing WINAPI as EXT_DECL and WINUSERAPI, BOOL as TYPE_NAME

compiler/bootstrap/libec/bootstrap/ast.c
compiler/libec/src/ast.ec

index d88eff8..ea6b9bd 100644 (file)
@@ -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;
index 6b696f8..9b56913 100644 (file)
@@ -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