codetools, lcl: added support for toWString from Giulio Bernardi

git-svn-id: trunk@14698 -
This commit is contained in:
vincents 2008-03-31 21:39:52 +00:00
parent 0153631ad7
commit abafe7aa85
2 changed files with 14 additions and 4 deletions

View File

@ -405,6 +405,10 @@ begin
if FirstError<>nil then Result:=FirstError.ErrorMessage;
end;
{$if not declared(toWString)}
const toWString = char(5);
{$endif}
procedure TLFMTree.ProcessValue;
var
s: String;
@ -429,13 +433,14 @@ begin
CloseChildNode;
end;
toString:
toString, toWString:
begin
CreateChildNode(TLFMValueNode);
TLFMValueNode(CurNode).ValueType:=lfmvString;
while Parser.NextToken = '+' do begin
Parser.NextToken; // Get next string fragment
Parser.CheckToken(toString);
if not (Parser.Token in [toString,toWString]) then
Parser.CheckToken(toString);
end;
CloseChildNode;
end;

View File

@ -2411,6 +2411,10 @@ var
procedure ProcessProperty; forward;
{$if not declared(toWString)}
const toWString = char(5);
{$endif}
procedure ProcessValue;
procedure RaiseValueExpected;
@ -2440,13 +2444,14 @@ var
WriteLRSExtended(Output,flt);
parser.NextToken;
end;
toString:
toString, toWString:
begin
toStringBuf := parser.TokenWideString;
while parser.NextToken = '+' do
begin
parser.NextToken; // Get next string fragment
parser.CheckToken(toString);
if not (parser.Token in [toString,toWString]) then
parser.CheckToken(toString);
toStringBuf := toStringBuf + parser.TokenWideString;
end;
if WideStringNeeded(toStringBuf) then begin