mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 19:41:18 +02:00
parent
e783e54e8c
commit
dbc9b7f8b4
@ -3222,13 +3222,13 @@ begin
|
|||||||
ExpectIdentifier;
|
ExpectIdentifier;
|
||||||
Location:=CurTokenText;
|
Location:=CurTokenText;
|
||||||
NextToken;
|
NextToken;
|
||||||
if CurToken=tkDot then
|
While CurToken=tkDot do
|
||||||
begin
|
begin
|
||||||
ExpectIdentifier;
|
ExpectIdentifier;
|
||||||
Location:=Location+'.'+CurTokenText;
|
Location:=Location+'.'+CurTokenText;
|
||||||
end
|
NextToken;
|
||||||
else
|
end;
|
||||||
UnGetToken;
|
UnGetToken;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
UngetToken;
|
UngetToken;
|
||||||
|
@ -33,6 +33,9 @@ Type
|
|||||||
Procedure TestSimpleVarInitialized;
|
Procedure TestSimpleVarInitialized;
|
||||||
procedure TestSimpleVarInitializedDeprecated;
|
procedure TestSimpleVarInitializedDeprecated;
|
||||||
procedure TestSimpleVarInitializedPlatform;
|
procedure TestSimpleVarInitializedPlatform;
|
||||||
|
Procedure TestSimpleVarAbsolute;
|
||||||
|
Procedure TestSimpleVarAbsoluteDot;
|
||||||
|
Procedure TestSimpleVarAbsolute2Dots;
|
||||||
Procedure TestVarProcedure;
|
Procedure TestVarProcedure;
|
||||||
Procedure TestVarFunctionINitialized;
|
Procedure TestVarFunctionINitialized;
|
||||||
Procedure TestVarProcedureDeprecated;
|
Procedure TestVarProcedureDeprecated;
|
||||||
@ -182,6 +185,27 @@ begin
|
|||||||
AssertExpression('Variable value',TheVar.expr,pekNumber,'123');
|
AssertExpression('Variable value',TheVar.expr,pekNumber,'123');
|
||||||
end;
|
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;
|
procedure TTestVarParser.TestVarProcedure;
|
||||||
begin
|
begin
|
||||||
ParseVar('procedure','');
|
ParseVar('procedure','');
|
||||||
|
Loading…
Reference in New Issue
Block a user