MG: fixes for parser and linkscanner and small cleanups

git-svn-id: trunk@420 -
This commit is contained in:
lazarus 2001-11-14 19:10:03 +00:00
parent a7787f8119
commit beb8444fd0
6 changed files with 16 additions and 38 deletions

View File

@ -1798,7 +1798,7 @@ begin
exit;
end;
if (AtomIsChar('(')) or (AtomIsChar('[')) then begin
if not ReadTilBracketClose(ExceptionOnNotFound) then exit;
if not ReadTilBracketClose then exit;
end;
until false;
Result:=true;
@ -3437,10 +3437,8 @@ begin
// read constant
repeat
ReadNextAtom;
if AtomIsChar('(') or AtomIsChar('[') then begin
if AtomIsChar('(') or AtomIsChar('[') then
ReadTilBracketClose(true);
ReadNextAtom;
end;
if AtomIsWord and (not IsKeyWordInConstAllowed.DoItUppercase(UpperSrc,
CurPos.StartPos,CurPos.EndPos-CurPos.StartPos))
and (UpAtomIs('END') or AtomIsKeyWord) then
@ -3748,7 +3746,6 @@ function TPascalParserTool.KeyWordFuncTypeDefault: boolean;
(a)..4
Low(integer)..High(integer)
'a'..'z'
string[]
}
var SubRangeOperatorFound: boolean;
@ -3776,10 +3773,6 @@ begin
SubRangeOperatorFound:=false;
if AtomIsIdentifier(false) then begin
ReadNextAtom;
while AtomIsChar('(') or AtomIsChar('[') do begin
ReadTilBracketClose(true);
ReadNextAtom;
end;
if not AtomIs('..') then begin
// an identifier
CurNode.Desc:=ctnIdentifier;

View File

@ -413,6 +413,7 @@ begin
Add('EXTERNAL',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('FORWARD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('PASCAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('ASSEMBLER',{$ifdef FPC}@{$endif}AllwaysTrue);
end;
IsKeyWordProcedureTypeSpecifier:=TKeyWordFunctionList.Create;
with IsKeyWordProcedureTypeSpecifier do begin

View File

@ -4557,13 +4557,12 @@ end;
Procedure TMainIDE.OnSrcNotebookEditorVisibleChanged(Sender : TObject);
var
NewSrcEdit : TSourceEditor;
ActiveUnitInfo : TUnitInfo;
begin
if SourceNotebook.Notebook = nil then Exit;
NewSrcEdit:=SourceNotebook.GetActiveSE;
ActiveUnitInfo := Project.UnitWithEditorIndex(SourceNotebook.Notebook.Pageindex);
ActiveUnitInfo :=
Project.UnitWithEditorIndex(SourceNotebook.Notebook.Pageindex);
if ActiveUnitInfo = nil then Exit;
ToggleFormSpeedBtn.Enabled := Assigned(ActiveUnitInfo.Form);
@ -4593,6 +4592,9 @@ end.
{ =============================================================================
$Log$
Revision 1.144 2001/11/14 19:10:00 lazarus
MG: fixes for parser and linkscanner and small cleanups
Revision 1.143 2001/11/14 17:46:54 lazarus
Changes to make toggling between form and unit work.
Added BringWindowToTop

View File

@ -288,7 +288,6 @@ type
procedure UpdateStatusBar;
Procedure ClearUnUsedEditorComponents(Force: boolean);
Procedure DisplayCodeforControl(Control : TObject);
Procedure DisplayCodefromUnitName(const UnitName : String);
Procedure NewClicked(Sender: TObject);
@ -2145,29 +2144,6 @@ writeln('TSourceNotebook.NewSE end ');
{$ENDIF}
end;
Procedure TSourceNotebook.DisplayCodeforControl(Control : TObject);
Var
I,X : Integer;
Begin
Writeln('DISPLAY CODE FOR CONTROL');
Writeln('This was commented out on 11-14-2001');
Writeln('This should be deleted a month from that day if it''s not used.');
{ X := FSourceEditorList.Count;
if X = 0 then Exit;
I := 0;
while (I < X)
and (TSourceEditor(FSourceEditorList.Items[I]).Control <> TComponent(Control)) do
Begin
inc(i);
Writeln(' I = '+inttostr(i));
end;
if I < X then s
DisplayPage(TSourceEditor(FSOurceEditorList.Items[I]));
}
End;
Procedure TSourceNotebook.DisplayCodefromUnitName(const UnitName : String);
Var
I,X : Integer;

View File

@ -195,7 +195,7 @@ begin
GetMem(FormatList,SizeOf(TClipboardFormat)*FCount);
for i:=0 to FCount-1 do
FormatList[i]:=FData[i].FormatID;
writeln('[TClipboard.GetOwnerShip] A ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
//writeln('[TClipboard.GetOwnerShip] A ',ClipboardTypeName[ClipboardType],' Allocated=',FAllocated);
FAllocated:=ClipboardGetOwnerShip(ClipboardType,@InternalOnRequest,FCount,
FormatList);
FreeMem(FormatList);
@ -588,6 +588,9 @@ end;
{
$Log$
Revision 1.5 2001/11/14 19:10:03 lazarus
MG: fixes for parser and linkscanner and small cleanups
Revision 1.4 2001/11/12 16:56:07 lazarus
MG: CLIPBOARD

View File

@ -17,7 +17,7 @@ end;
Function TInterfaceBase.BringWindowToTop(hWnd : HWND): Boolean;
begin
// Your default here
// Result :=
Result := false;
end;
function TInterfaceBase.CallNextHookEx(hhk : HHOOK; ncode : Integer; wParam, lParam : Longint) : Integer;
@ -498,6 +498,9 @@ end;
{ =============================================================================
$Log$
Revision 1.20 2001/11/14 19:10:03 lazarus
MG: fixes for parser and linkscanner and small cleanups
Revision 1.19 2001/11/14 17:46:58 lazarus
Changes to make toggling between form and unit work.
Added BringWindowToTop