Browse Source

* Skip unknown tokens when skipping due to conditional compiling

git-svn-id: trunk@11056 -
michael 17 years ago
parent
commit
383beb047b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/fcl-passrc/src/pscanner.pp

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

@@ -1071,8 +1071,11 @@ begin
 
 
         Result := tkIdentifier;
         Result := tkIdentifier;
       end;
       end;
-  else
-    Error(SErrInvalidCharacter, [TokenStr[0]]);
+  else 
+    if PPIsSkipping then
+      Inc(TokenStr)
+    else  
+      Error(SErrInvalidCharacter, [TokenStr[0]]);
   end;
   end;
 
 
   FCurToken := Result;
   FCurToken := Result;