mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:29:21 +02:00
codetools: reader tool: dotted uses
git-svn-id: trunk@32102 -
This commit is contained in:
parent
119ae65d33
commit
e9498b62da
@ -208,8 +208,8 @@ type
|
|||||||
// uses sections
|
// uses sections
|
||||||
procedure MoveCursorToUsesStart(UsesNode: TCodeTreeNode);
|
procedure MoveCursorToUsesStart(UsesNode: TCodeTreeNode);
|
||||||
procedure MoveCursorToUsesEnd(UsesNode: TCodeTreeNode);
|
procedure MoveCursorToUsesEnd(UsesNode: TCodeTreeNode);
|
||||||
procedure ReadNextUsedUnit(out UnitNameAtom, InAtom: TAtomPosition);
|
procedure ReadNextUsedUnit(out UnitNameRange, InAtom: TAtomPosition);
|
||||||
procedure ReadPriorUsedUnit(out UnitNameAtom, InAtom: TAtomPosition);
|
procedure ReadPriorUsedUnit(out UnitNameRange, InAtom: TAtomPosition);
|
||||||
|
|
||||||
// comments
|
// comments
|
||||||
function FindCommentInFront(const StartPos: TCodeXYPosition;
|
function FindCommentInFront(const StartPos: TCodeXYPosition;
|
||||||
@ -2513,12 +2513,17 @@ begin
|
|||||||
RaiseExceptionFmt(ctsStrExpectedButAtomFound,[';',GetAtom]);
|
RaiseExceptionFmt(ctsStrExpectedButAtomFound,[';',GetAtom]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPascalReaderTool.ReadNextUsedUnit(out UnitNameAtom,
|
procedure TPascalReaderTool.ReadNextUsedUnit(out UnitNameRange,
|
||||||
InAtom: TAtomPosition);
|
InAtom: TAtomPosition);
|
||||||
begin
|
begin
|
||||||
AtomIsIdentifier(true);
|
AtomIsIdentifier(true);
|
||||||
UnitNameAtom:=CurPos;
|
UnitNameRange:=CurPos;
|
||||||
|
repeat
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
if CurPos.Flag<>cafPoint then break;
|
||||||
|
ReadNextAtom;
|
||||||
|
AtomIsIdentifier(true);
|
||||||
|
until false;
|
||||||
if UpAtomIs('IN') then begin
|
if UpAtomIs('IN') then begin
|
||||||
ReadNextAtom; // read filename
|
ReadNextAtom; // read filename
|
||||||
if not AtomIsStringConstant then
|
if not AtomIsStringConstant then
|
||||||
@ -2530,7 +2535,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPascalReaderTool.ReadPriorUsedUnit(out UnitNameAtom,
|
procedure TPascalReaderTool.ReadPriorUsedUnit(out UnitNameRange,
|
||||||
InAtom: TAtomPosition);
|
InAtom: TAtomPosition);
|
||||||
begin
|
begin
|
||||||
ReadPriorAtom; // read unitname
|
ReadPriorAtom; // read unitname
|
||||||
@ -2544,7 +2549,14 @@ begin
|
|||||||
InAtom:=CleanAtomPosition;
|
InAtom:=CleanAtomPosition;
|
||||||
end;
|
end;
|
||||||
AtomIsIdentifier(true);
|
AtomIsIdentifier(true);
|
||||||
UnitNameAtom:=CurPos;
|
UnitNameRange:=CurPos;
|
||||||
|
repeat
|
||||||
|
ReadPriorAtom;
|
||||||
|
if CurPos.Flag<>cafPoint then break;
|
||||||
|
ReadPriorAtom;
|
||||||
|
AtomIsIdentifier(true);
|
||||||
|
UnitNameRange.StartPos:=CurPos.StartPos;
|
||||||
|
until false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPascalReaderTool.FindCommentInFront(const StartPos: TCodeXYPosition;
|
function TPascalReaderTool.FindCommentInFront(const StartPos: TCodeXYPosition;
|
||||||
|
Loading…
Reference in New Issue
Block a user