mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:50:32 +02:00
MG: fixed parser for dephis activex
git-svn-id: trunk@1502 -
This commit is contained in:
parent
c40bc842d5
commit
22fcb1c759
@ -287,9 +287,10 @@ writeln('TMethodJumpingCodeTool.FindJumpPoint D ',CleanCursorPos,', |',copy(Src,
|
||||
TypeSectionNode:=TypeSectionNode.Parent;
|
||||
// search the method node under the cursor
|
||||
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,false);
|
||||
if (CursorNode=nil)
|
||||
or (not (CursorNode.Desc in [ctnProcedureHead,ctnProcedure])) then
|
||||
exit;
|
||||
while (CursorNode<>nil)
|
||||
and (not (CursorNode.Desc in [ctnProcedureHead,ctnProcedure])) do
|
||||
CursorNode:=CursorNode.Parent;
|
||||
if (CursorNode=nil) then exit;
|
||||
// search corresponding proc node
|
||||
Result:=FindBestProcNode(CursorNode,[phpAddClassName,phpInUpperCase],
|
||||
TypeSectionNode,[phpIgnoreForwards,phpInUpperCase]);
|
||||
|
@ -2768,14 +2768,9 @@ begin
|
||||
if AtomIsChar(')') or UpAtomIs('END') then break;
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnRecordVariant;
|
||||
repeat
|
||||
ReadNextAtom; // read till ':'
|
||||
if AtomIsChar(':') then break
|
||||
else if AtomIsChar('(') or AtomIsChar('[') then
|
||||
ReadTilBracketClose(true)
|
||||
else if UpAtomIs('END') or AtomIsChar(')') or AtomIsKeyWord then
|
||||
RaiseException(': expected, but '+GetAtom+' found');
|
||||
until false;
|
||||
ReadConstant(true,false,[]);
|
||||
if not AtomIsChar(':') then
|
||||
RaiseException(': expected, but '+GetAtom+' found');
|
||||
ReadNextAtom; // read '('
|
||||
if not AtomIsChar('(') then
|
||||
RaiseException('( expected, but '+GetAtom+' found');
|
||||
|
Loading…
Reference in New Issue
Block a user