Explorar o código

Accept and discard a C++/Java type for the catch parameter

mingodad %!s(int64=7) %!d(string=hai) anos
pai
achega
358e54bb31
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      SquiLu/squirrel/sqcompiler.cpp

+ 5 - 0
SquiLu/squirrel/sqcompiler.cpp

@@ -2973,6 +2973,11 @@ error:
         Expect(TK_CATCH);
         Expect(TK_CATCH);
         Expect(_SC('('));
         Expect(_SC('('));
         exid = Expect(TK_IDENTIFIER);
         exid = Expect(TK_IDENTIFIER);
+        if(CheckTypeName(exid)) //C/C++ type declaration;
+        {
+           //for now just accept the type and do nothing with it
+           exid = Expect(TK_IDENTIFIER);
+        }
         Expect(_SC(')'));
         Expect(_SC(')'));
         {
         {
             BEGIN_SCOPE();
             BEGIN_SCOPE();