Selaa lähdekoodia

+ Implemented support for ;public name XYZ; construct

git-svn-id: trunk@4133 -
michael 19 vuotta sitten
vanhempi
commit
aa2d333b11
1 muutettua tiedostoa jossa 18 lisäystä ja 1 poistoa
  1. 18 1
      fcl/passrc/pparser.pp

+ 18 - 1
fcl/passrc/pparser.pp

@@ -1492,10 +1492,27 @@ begin
         begin
         ExpectToken(tkSemicolon);
         end 
-      else if (UpperCase(CurTokenString) = 'EXTERNAL') then  
+      else if (tok = 'EXTERNAL') then  
         repeat
           NextToken;
         until CurToken = tkSemicolon
+      else if (tok = 'PUBLIC') then  
+        begin
+          NextToken; 
+          { Should be token Name, 
+            if not we're in a class and the public section starts }
+          If (Uppercase(CurTokenString)<>'NAME') then
+            begin
+            UngetToken;
+            UngetToken;
+            Break;
+            end
+          else
+            begin  
+            NextToken;  // Should be export name string.
+            ExpectToken(tkSemicolon);
+            end;
+        end
       else
         begin
         UnGetToken;