fixed type of Low(open array) and type of PathDelim

git-svn-id: trunk@5759 -
This commit is contained in:
mattias 2004-08-09 18:22:08 +00:00
parent c7beb98017
commit 0c6ffcf286
2 changed files with 43 additions and 6 deletions

View File

@ -4501,7 +4501,7 @@ begin
Result.Context:=CreateFindContext(Self,Node);
{$IFDEF ShowExprEval}
DebugLn('[TFindDeclarationTool.ConvertNodeToExpressionType] B',
' Node=',Node.DescAsString);
' Expr=',ExprTypeToString(Result));
{$ENDIF}
if Node.Desc=ctnRangeType then begin
// range type -> convert to special expression type
@ -4512,6 +4512,27 @@ begin
// ToDo: check for circles
Params.Save(OldInput);
Params.ContextNode:=Node;
Result:=ReadOperandTypeAtCursor(Params);
Params.Load(OldInput);
Result.Context:=CreateFindContext(Self,Node);
end else if (Node.Desc=ctnConstDefinition) and (Node.FirstChild=nil) then
begin
// const -> convert to special expression type
// ToDo: ppu, ppw, dcu files
MoveCursorToNodeStart(Node);
ReadNextAtom;
if not AtomIsIdentifier(false) then exit;
ReadNextAtom;
if not (CurPos.Flag in [cafEqual,cafColon]) then exit;
ReadNextAtom;
// ToDo: check for circles
Params.Save(OldInput);
Params.ContextNode:=Node;
Result:=ReadOperandTypeAtCursor(Params);
@ -4673,9 +4694,15 @@ var
ParamList: TExprTypeList;
ParamNode: TCodeTreeNode;
begin
Result:=CleanExpressionType;
IdentPos:=@Src[StartPos];
Result.Desc:=PredefinedIdentToExprTypeDesc(IdentPos);
{$IFDEF ShowExprEval}
debugln('TFindDeclarationTool.FindExpressionTypeOfPredefinedIdentifier ',
ExpressionTypeDescNames[Result.Desc]);
{$ENDIF}
case Result.Desc of
xtCompilerFunc:
begin
@ -4695,6 +4722,9 @@ begin
else if (CompareIdentifiers(IdentPos,'LOW')=0)
or (CompareIdentifiers(IdentPos,'HIGH')=0) then
begin
{$IFDEF ShowExprEval}
debugln('TFindDeclarationTool.FindExpressionTypeOfPredefinedIdentifier Ident=',GetIdentifier(IdentPos));
{$ENDIF}
{ examples:
Low(ordinal type) is the ordinal type
Low(array) has type of the array items
@ -4715,7 +4745,10 @@ begin
ctnOpenArrayType:
// array without explicit range -> open array
// Low(Open array) is ordinal integer
Result.Desc:=xtConstOrdInteger;
begin
Result.Desc:=xtConstOrdInteger;
Result.Context:=CleanFindContext;
end;
ctnRangedArrayType:
begin

View File

@ -1139,11 +1139,11 @@ begin
{$IFDEF VerboseSizeMsg}
LCLObject:=GetNearestLCLObject(Widget);
write('TGtkWidgetSet.RealizeWidgetSize Widget=',HexStr(Cardinal(Widget),8),
' New=',NewWidth,',',NewHeight);
DbgOut('TGtkWidgetSet.RealizeWidgetSize Widget='+HexStr(Cardinal(Widget),8),
' New='+dbgs(NewWidth)+','+dbgs(NewHeight));
if (LCLObject<>nil) and (LCLObject is TControl) then begin
with TControl(LCLObject) do
DebugLn(' LCL=',Name,':',ClassName,' ',Left,',',Top,',',Width,',',Height);
DebugLn(' LCL=',Name,':',ClassName,' ',dbgs(Left),',',dbgs(Top),',',dbgs(Width),',',dbgs(Height));
end else begin
DebugLn(' LCL=',HexStr(Cardinal(LCLObject),8));
end;
@ -5998,7 +5998,8 @@ begin
gtk_clist_set_column_justification(CListWidget,i,
aGTKJUSTIFICATION[Alignment]);
//set width
gtk_clist_set_column_width(CListWidget,i,Width);
if Width>0 then
gtk_clist_set_column_width(CListWidget,i,Width);
//set auto sizing
gtk_clist_set_column_auto_resize(CListWidget,i, AutoSize);
//set Visible
@ -9214,6 +9215,9 @@ end;
{ =============================================================================
$Log$
Revision 1.519 2004/08/09 18:22:08 mattias
fixed type of Low(open array) and type of PathDelim
Revision 1.518 2004/07/30 20:55:16 vincents
updated localization