mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 06:20:34 +02:00
codetools: allowed: var identifier: class of identifier
git-svn-id: trunk@10222 -
This commit is contained in:
parent
01c3d62fc8
commit
e5fdfd28ff
@ -3021,9 +3021,14 @@ var
|
|||||||
ChildCreated: boolean;
|
ChildCreated: boolean;
|
||||||
ClassAtomPos: TAtomPosition;
|
ClassAtomPos: TAtomPosition;
|
||||||
Level: integer;
|
Level: integer;
|
||||||
|
ContextDesc: Word;
|
||||||
begin
|
begin
|
||||||
if not (CurNode.Desc in [ctnTypeDefinition,ctnGenericType]) then
|
ContextDesc:=CurNode.Desc;
|
||||||
|
if not (ContextDesc in [ctnTypeDefinition,ctnGenericType,
|
||||||
|
ctnVarDefinition,ctnConstDefinition])
|
||||||
|
then begin
|
||||||
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
|
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
|
||||||
|
end;
|
||||||
if (LastUpAtomIs(0,'PACKED')) then begin
|
if (LastUpAtomIs(0,'PACKED')) then begin
|
||||||
ClassAtomPos:=LastAtoms.GetValueAt(0);
|
ClassAtomPos:=LastAtoms.GetValueAt(0);
|
||||||
end else begin
|
end else begin
|
||||||
@ -3051,6 +3056,9 @@ begin
|
|||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if CurPos.Flag<>cafSemicolon then
|
if CurPos.Flag<>cafSemicolon then
|
||||||
RaiseCharExpectedButAtomFound(';');
|
RaiseCharExpectedButAtomFound(';');
|
||||||
|
end else if not (ContextDesc in [ctnTypeDefinition,ctnGenericType]) then begin
|
||||||
|
MoveCursorToNodeStart(CurNode);
|
||||||
|
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
|
||||||
end else if (CurPos.Flag=cafRoundBracketOpen) then begin
|
end else if (CurPos.Flag=cafRoundBracketOpen) then begin
|
||||||
// read inheritage brackets
|
// read inheritage brackets
|
||||||
ReadTilBracketClose(true);
|
ReadTilBracketClose(true);
|
||||||
|
@ -145,7 +145,16 @@ end;
|
|||||||
|
|
||||||
function GetDefaultLCLWidgetType: string;
|
function GetDefaultLCLWidgetType: string;
|
||||||
begin
|
begin
|
||||||
Result:=WidgetSet.WidgetSetName;
|
if WidgetSet<>nil then
|
||||||
|
Result:=WidgetSet.WidgetSetName
|
||||||
|
else begin
|
||||||
|
{$IFDEF MSWindows}{$DEFINE WidgetSetDefined}
|
||||||
|
Result:='win32';
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFNDEF WidgetSetDefined}
|
||||||
|
Result:='gtk';
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetDefaultLCLLibPaths(const Prefix, Postfix, Separator: string): string;
|
function GetDefaultLCLLibPaths(const Prefix, Postfix, Separator: string): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user