* Fix Bug ID #31733

git-svn-id: trunk@36179 -
This commit is contained in:
michael 2017-05-11 15:13:56 +00:00
parent e783e54e8c
commit dbc9b7f8b4
2 changed files with 28 additions and 4 deletions

View File

@ -3222,13 +3222,13 @@ begin
ExpectIdentifier;
Location:=CurTokenText;
NextToken;
if CurToken=tkDot then
While CurToken=tkDot do
begin
ExpectIdentifier;
Location:=Location+'.'+CurTokenText;
end
else
UnGetToken;
NextToken;
end;
UnGetToken;
end
else
UngetToken;

View File

@ -33,6 +33,9 @@ Type
Procedure TestSimpleVarInitialized;
procedure TestSimpleVarInitializedDeprecated;
procedure TestSimpleVarInitializedPlatform;
Procedure TestSimpleVarAbsolute;
Procedure TestSimpleVarAbsoluteDot;
Procedure TestSimpleVarAbsolute2Dots;
Procedure TestVarProcedure;
Procedure TestVarFunctionINitialized;
Procedure TestVarProcedureDeprecated;
@ -182,6 +185,27 @@ begin
AssertExpression('Variable value',TheVar.expr,pekNumber,'123');
end;
procedure TTestVarParser.TestSimpleVarAbsolute;
begin
ParseVar('q absolute v','');
AssertVariableType('q');
AssertEquals('correct absolute location','v',TheVar.AbsoluteLocation);
end;
procedure TTestVarParser.TestSimpleVarAbsoluteDot;
begin
ParseVar('q absolute v.w','');
AssertVariableType('q');
AssertEquals('correct absolute location','v.w',TheVar.AbsoluteLocation);
end;
procedure TTestVarParser.TestSimpleVarAbsolute2Dots;
begin
ParseVar('q absolute v.w.x','');
AssertVariableType('q');
AssertEquals('correct absolute location','v.w.x',TheVar.AbsoluteLocation);
end;
procedure TTestVarParser.TestVarProcedure;
begin
ParseVar('procedure','');