Browse Source

* Fixed $UNDEF

git-svn-id: trunk@21930 -
michael 13 years ago
parent
commit
8b8ccb9e05
2 changed files with 5 additions and 4 deletions
  1. 3 3
      packages/fcl-passrc/src/pparser.pp
  2. 2 1
      packages/fcl-passrc/src/pscanner.pp

+ 3 - 3
packages/fcl-passrc/src/pparser.pp

@@ -1864,7 +1864,7 @@ begin
   while True do
   begin
     NextToken;
-    //writeln('TPasParser.ParseSection Token=',Scanner.CurTokenString,' ',CurToken);
+  //  writeln('TPasParser.ParseSection Token=',CurTokenString,' ',CurToken, ' ',scanner.CurFilename);
     case CurToken of
       tkend:
         begin
@@ -2942,12 +2942,12 @@ var
   BeginBlock: TPasImplBeginBlock;
   SubBlock: TPasImplElement;
 begin
-  //writeln('TPasParser.ParseProcBeginBlock ');
 
   BeginBlock := TPasImplBeginBlock(CreateElement(TPasImplBeginBlock, '', Parent));
   Parent.Body := BeginBlock;
   repeat
     NextToken;
+//    writeln('TPasParser.ParseProcBeginBlock ',curtokenstring);
     if CurToken=tkend then
       break
     else if CurToken<>tkSemiColon then
@@ -2959,6 +2959,7 @@ begin
     end;
   until false;
   ExpectToken(tkSemicolon);
+//  writeln('TPasParser.ParseProcBeginBlock ended ',curtokenstring);
 end;
 
 // Next token is start of (compound) statement
@@ -3241,7 +3242,6 @@ begin
           //writeln(i,'EXCEPT');
           el:=TPasImplTryExcept(CreateElement(TPasImplTryExcept,'',CurBlock));
           TPasImplTry(CurBlock).FinallyExcept:=TPasImplTryExcept(el);
-//          CurBlock.AddElement(el);
           CurBlock:=TPasImplTryExcept(el);
         end else
           ParseExc(SParserSyntaxError);

+ 2 - 1
packages/fcl-passrc/src/pscanner.pp

@@ -1049,6 +1049,7 @@ begin
         break;
     end; // Case
   end;
+//  Writeln(Result, '(',CurTokenString,')');
 end;
 
 procedure TPascalScanner.Error(const Msg: string);
@@ -1210,7 +1211,7 @@ Var
 begin
   Param := UpperCase(Param);
   Index:=FDefines.IndexOf(Param);
-  If (Index<0) then
+  If (Index>=0) then
     RemoveDefine(Param)
   else
     begin