mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
fixed type of Low(open array) and type of PathDelim
git-svn-id: trunk@5759 -
This commit is contained in:
parent
c7beb98017
commit
0c6ffcf286
@ -4501,7 +4501,7 @@ begin
|
|||||||
Result.Context:=CreateFindContext(Self,Node);
|
Result.Context:=CreateFindContext(Self,Node);
|
||||||
{$IFDEF ShowExprEval}
|
{$IFDEF ShowExprEval}
|
||||||
DebugLn('[TFindDeclarationTool.ConvertNodeToExpressionType] B',
|
DebugLn('[TFindDeclarationTool.ConvertNodeToExpressionType] B',
|
||||||
' Node=',Node.DescAsString);
|
' Expr=',ExprTypeToString(Result));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if Node.Desc=ctnRangeType then begin
|
if Node.Desc=ctnRangeType then begin
|
||||||
// range type -> convert to special expression type
|
// range type -> convert to special expression type
|
||||||
@ -4512,6 +4512,27 @@ begin
|
|||||||
|
|
||||||
// ToDo: check for circles
|
// 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.Save(OldInput);
|
||||||
Params.ContextNode:=Node;
|
Params.ContextNode:=Node;
|
||||||
Result:=ReadOperandTypeAtCursor(Params);
|
Result:=ReadOperandTypeAtCursor(Params);
|
||||||
@ -4673,9 +4694,15 @@ var
|
|||||||
ParamList: TExprTypeList;
|
ParamList: TExprTypeList;
|
||||||
ParamNode: TCodeTreeNode;
|
ParamNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
Result:=CleanExpressionType;
|
Result:=CleanExpressionType;
|
||||||
IdentPos:=@Src[StartPos];
|
IdentPos:=@Src[StartPos];
|
||||||
Result.Desc:=PredefinedIdentToExprTypeDesc(IdentPos);
|
Result.Desc:=PredefinedIdentToExprTypeDesc(IdentPos);
|
||||||
|
|
||||||
|
{$IFDEF ShowExprEval}
|
||||||
|
debugln('TFindDeclarationTool.FindExpressionTypeOfPredefinedIdentifier ',
|
||||||
|
ExpressionTypeDescNames[Result.Desc]);
|
||||||
|
{$ENDIF}
|
||||||
case Result.Desc of
|
case Result.Desc of
|
||||||
xtCompilerFunc:
|
xtCompilerFunc:
|
||||||
begin
|
begin
|
||||||
@ -4695,6 +4722,9 @@ begin
|
|||||||
else if (CompareIdentifiers(IdentPos,'LOW')=0)
|
else if (CompareIdentifiers(IdentPos,'LOW')=0)
|
||||||
or (CompareIdentifiers(IdentPos,'HIGH')=0) then
|
or (CompareIdentifiers(IdentPos,'HIGH')=0) then
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF ShowExprEval}
|
||||||
|
debugln('TFindDeclarationTool.FindExpressionTypeOfPredefinedIdentifier Ident=',GetIdentifier(IdentPos));
|
||||||
|
{$ENDIF}
|
||||||
{ examples:
|
{ examples:
|
||||||
Low(ordinal type) is the ordinal type
|
Low(ordinal type) is the ordinal type
|
||||||
Low(array) has type of the array items
|
Low(array) has type of the array items
|
||||||
@ -4715,7 +4745,10 @@ begin
|
|||||||
ctnOpenArrayType:
|
ctnOpenArrayType:
|
||||||
// array without explicit range -> open array
|
// array without explicit range -> open array
|
||||||
// Low(Open array) is ordinal integer
|
// Low(Open array) is ordinal integer
|
||||||
Result.Desc:=xtConstOrdInteger;
|
begin
|
||||||
|
Result.Desc:=xtConstOrdInteger;
|
||||||
|
Result.Context:=CleanFindContext;
|
||||||
|
end;
|
||||||
|
|
||||||
ctnRangedArrayType:
|
ctnRangedArrayType:
|
||||||
begin
|
begin
|
||||||
|
@ -1139,11 +1139,11 @@ begin
|
|||||||
|
|
||||||
{$IFDEF VerboseSizeMsg}
|
{$IFDEF VerboseSizeMsg}
|
||||||
LCLObject:=GetNearestLCLObject(Widget);
|
LCLObject:=GetNearestLCLObject(Widget);
|
||||||
write('TGtkWidgetSet.RealizeWidgetSize Widget=',HexStr(Cardinal(Widget),8),
|
DbgOut('TGtkWidgetSet.RealizeWidgetSize Widget='+HexStr(Cardinal(Widget),8),
|
||||||
' New=',NewWidth,',',NewHeight);
|
' New='+dbgs(NewWidth)+','+dbgs(NewHeight));
|
||||||
if (LCLObject<>nil) and (LCLObject is TControl) then begin
|
if (LCLObject<>nil) and (LCLObject is TControl) then begin
|
||||||
with TControl(LCLObject) do
|
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
|
end else begin
|
||||||
DebugLn(' LCL=',HexStr(Cardinal(LCLObject),8));
|
DebugLn(' LCL=',HexStr(Cardinal(LCLObject),8));
|
||||||
end;
|
end;
|
||||||
@ -5998,7 +5998,8 @@ begin
|
|||||||
gtk_clist_set_column_justification(CListWidget,i,
|
gtk_clist_set_column_justification(CListWidget,i,
|
||||||
aGTKJUSTIFICATION[Alignment]);
|
aGTKJUSTIFICATION[Alignment]);
|
||||||
//set width
|
//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
|
//set auto sizing
|
||||||
gtk_clist_set_column_auto_resize(CListWidget,i, AutoSize);
|
gtk_clist_set_column_auto_resize(CListWidget,i, AutoSize);
|
||||||
//set Visible
|
//set Visible
|
||||||
@ -9214,6 +9215,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.518 2004/07/30 20:55:16 vincents
|
||||||
updated localization
|
updated localization
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user