implemented showing proc specifiers in codeexplorer

git-svn-id: trunk@6405 -
This commit is contained in:
mattias 2004-12-22 10:19:26 +00:00
parent 9a37fb3c97
commit 53d6e145dc
3 changed files with 13 additions and 9 deletions

View File

@ -61,6 +61,7 @@ type
phpWithResultType, // extract colon + result type
phpWithOfObject, // extract 'of object'
phpWithCallingSpecs, // extract cdecl; inline;
phpWithProcModifiers, // extract forward; alias; external;
phpWithComments, // extract comments and spaces
phpInUpperCase, // turn to uppercase
phpCommentsToSpace, // replace comments with a single space
@ -244,6 +245,7 @@ const
'phpWithResultType',
'phpWithOfObject',
'phpWithCallingSpecs',
'phpWithProcModifiers',
'phpWithComments',
'phpInUpperCase',
'phpCommentsToSpace',

View File

@ -418,20 +418,22 @@ begin
if CurPos.Flag=cafSemicolon then
ExtractNextAtom(true,Attr);
// read specifiers
if phpWithCallingSpecs in Attr then begin
if [phpWithCallingSpecs,phpWithProcModifiers]*Attr<>[] then begin
while (CurPos.StartPos<=ProcNode.FirstChild.EndPos) do begin
if CurPos.Flag=cafSemicolon then begin
ExtractNextAtom(false,Attr);
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
end else begin
if (UpAtomIs('INLINE') or UpAtomIs('CDECL')) then begin
ExtractNextAtom(phpWithCallingSpecs in Attr,Attr);
ExtractMemStream.Write(';',1);
ExtractNextAtom([phpWithCallingSpecs,phpWithProcModifiers]*Attr<>[],
Attr);
if not (phpWithProcModifiers in Attr) then
ExtractMemStream.Write(';',1);
end
else if (CurPos.Flag=cafEdgedBracketOpen) then begin
ReadTilBracketClose(false);
ExtractNextAtom(false,Attr);
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
end else begin
ExtractNextAtom(false,Attr);
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
end;
end;
end;

View File

@ -257,7 +257,7 @@ begin
Result:=ACodeTool.ExtractProcHead(CodeNode,
[phpWithStart,phpWithVarModifiers,
phpWithParameterNames,phpWithDefaultValues,phpWithResultType,
phpWithOfObject,phpWithCallingSpecs]);
phpWithOfObject,phpWithCallingSpecs,phpWithProcModifiers]);
ctnProperty:
Result:='property '+ACodeTool.ExtractPropName(CodeNode,false);
@ -352,10 +352,10 @@ begin
NodeImageIndex:=GetNodeImage(CodeNode);
if InFrontViewNode<>nil then
ViewNode:=CodeTreeview.Items.InsertObjectBehind(
InFrontViewNode,NodeText,NodeData)
InFrontViewNode,NodeText,NodeData)
else if ParentViewNode<>nil then
ViewNode:=CodeTreeview.Items.AddChildObject(
ParentViewNode,NodeText,NodeData)
ParentViewNode,NodeText,NodeData)
else
ViewNode:=CodeTreeview.Items.AddObject(nil,NodeText,NodeData);
ViewNode.ImageIndex:=NodeImageIndex;