mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-25 10:59:06 +02:00
* Fixed buggy support for + between long strings
This commit is contained in:
parent
01d9516261
commit
d51ccfbc13
@ -1249,7 +1249,8 @@ type
|
|||||||
toComma, // ,
|
toComma, // ,
|
||||||
toDot, // .
|
toDot, // .
|
||||||
toEqual, // =
|
toEqual, // =
|
||||||
toColon // :
|
toColon, // :
|
||||||
|
toPlus // +
|
||||||
);
|
);
|
||||||
|
|
||||||
TParser = class(TObject)
|
TParser = class(TObject)
|
||||||
@ -9843,7 +9844,8 @@ const
|
|||||||
',',
|
',',
|
||||||
'.',
|
'.',
|
||||||
'=',
|
'=',
|
||||||
':'
|
':',
|
||||||
|
'+'
|
||||||
);
|
);
|
||||||
|
|
||||||
function TParser.GetTokenName(aTok: TParserToken): string;
|
function TParser.GetTokenName(aTok: TParserToken): string;
|
||||||
@ -10251,6 +10253,7 @@ begin
|
|||||||
'.' : SetToken(toDot);
|
'.' : SetToken(toDot);
|
||||||
'=' : SetToken(toEqual);
|
'=' : SetToken(toEqual);
|
||||||
':' : SetToken(toColon);
|
':' : SetToken(toColon);
|
||||||
|
'+' : SetToken(toPlus);
|
||||||
else
|
else
|
||||||
HandleUnknown;
|
HandleUnknown;
|
||||||
end;
|
end;
|
||||||
@ -10379,7 +10382,7 @@ var
|
|||||||
ws : string;
|
ws : string;
|
||||||
begin
|
begin
|
||||||
ws:=left+parser.TokenString;
|
ws:=left+parser.TokenString;
|
||||||
while (parser.NextToken = classes.toString) and (Parser.TokenString='+') do
|
while parser.NextToken = toPlus do
|
||||||
begin
|
begin
|
||||||
parser.NextToken; // Get next string fragment
|
parser.NextToken; // Get next string fragment
|
||||||
if not (parser.Token=Classes.toString) then
|
if not (parser.Token=Classes.toString) then
|
||||||
|
Loading…
Reference in New Issue
Block a user