Browse Source

* Fixed buggy support for + between long strings

michael 4 years ago
parent
commit
d51ccfbc13
1 changed files with 6 additions and 3 deletions
  1. 6 3
      packages/rtl/classes.pas

+ 6 - 3
packages/rtl/classes.pas

@@ -1249,7 +1249,8 @@ type
                   toComma, // ,
                   toDot, // .
                   toEqual, // =
-                  toColon // :
+                  toColon, // :
+                  toPlus // +
                   );
 
   TParser = class(TObject)
@@ -9843,7 +9844,8 @@ const
     ',',
     '.',
     '=',
-    ':'
+    ':',
+    '+'
   );
 
 function TParser.GetTokenName(aTok: TParserToken): string;
@@ -10251,6 +10253,7 @@ begin
       '.' : SetToken(toDot);
       '=' : SetToken(toEqual);
       ':' : SetToken(toColon);
+      '+' : SetToken(toPlus);
       else
         HandleUnknown;
     end;
@@ -10379,7 +10382,7 @@ var
    ws : string;
 begin
   ws:=left+parser.TokenString;
-  while (parser.NextToken = classes.toString) and (Parser.TokenString='+') do
+  while parser.NextToken = toPlus do
     begin
     parser.NextToken;   // Get next string fragment
     if not (parser.Token=Classes.toString) then