Parcourir la source

* octal constant support

git-svn-id: trunk@772 -
florian il y a 20 ans
Parent
commit
614b06c3d4
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      fcl/passrc/pscanner.pp

+ 12 - 0
fcl/passrc/pscanner.pp

@@ -553,6 +553,18 @@ begin
           Move(TokenStart^, FCurTokenString[1], SectionLength);
         Result := tkChar;
       end;
+    '&':
+      begin
+        TokenStart := TokenStr;
+        repeat
+          Inc(TokenStr);
+        until not (TokenStr[0] in ['0'..'7']);
+        SectionLength := TokenStr - TokenStart;
+        SetLength(FCurTokenString, SectionLength);
+        if SectionLength > 0 then
+          Move(TokenStart^, FCurTokenString[1], SectionLength);
+        Result := tkNumber;
+      end;
     '$':
       begin
         TokenStart := TokenStr;