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

View File

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

View File

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