From beb8444fd08c89fde98d43dc6881162a13a57f7b Mon Sep 17 00:00:00 2001 From: lazarus Date: Wed, 14 Nov 2001 19:10:03 +0000 Subject: [PATCH] MG: fixes for parser and linkscanner and small cleanups git-svn-id: trunk@420 - --- components/codetools/codetools.pas | 11 ++--------- components/codetools/keywordfunclists.pas | 1 + ide/main.pp | 8 +++++--- ide/uniteditor.pp | 24 ----------------------- lcl/include/clipbrd.inc | 5 ++++- lcl/include/interfacebase.inc | 5 ++++- 6 files changed, 16 insertions(+), 38 deletions(-) diff --git a/components/codetools/codetools.pas b/components/codetools/codetools.pas index 7d262042cc..a293713412 100644 --- a/components/codetools/codetools.pas +++ b/components/codetools/codetools.pas @@ -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; diff --git a/components/codetools/keywordfunclists.pas b/components/codetools/keywordfunclists.pas index 3e21a362e9..500924a6d9 100644 --- a/components/codetools/keywordfunclists.pas +++ b/components/codetools/keywordfunclists.pas @@ -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 diff --git a/ide/main.pp b/ide/main.pp index 329b595cb5..df072532ae 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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 diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index dbfa5ead97..bdf9db6d9b 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -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; diff --git a/lcl/include/clipbrd.inc b/lcl/include/clipbrd.inc index 0fce675b0f..a762ebaa75 100644 --- a/lcl/include/clipbrd.inc +++ b/lcl/include/clipbrd.inc @@ -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 diff --git a/lcl/include/interfacebase.inc b/lcl/include/interfacebase.inc index ed11d0620e..df01be7b1d 100644 --- a/lcl/include/interfacebase.inc +++ b/lcl/include/interfacebase.inc @@ -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