codetools: allowed: var identifier: class of identifier

git-svn-id: trunk@10222 -
This commit is contained in:
mattias 2006-11-20 16:28:20 +00:00
parent 01c3d62fc8
commit e5fdfd28ff
2 changed files with 19 additions and 2 deletions

View File

@ -3021,9 +3021,14 @@ var
ChildCreated: boolean;
ClassAtomPos: TAtomPosition;
Level: integer;
ContextDesc: Word;
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']);
end;
if (LastUpAtomIs(0,'PACKED')) then begin
ClassAtomPos:=LastAtoms.GetValueAt(0);
end else begin
@ -3051,6 +3056,9 @@ begin
ReadNextAtom;
if CurPos.Flag<>cafSemicolon then
RaiseCharExpectedButAtomFound(';');
end else if not (ContextDesc in [ctnTypeDefinition,ctnGenericType]) then begin
MoveCursorToNodeStart(CurNode);
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
end else if (CurPos.Flag=cafRoundBracketOpen) then begin
// read inheritage brackets
ReadTilBracketClose(true);

View File

@ -145,7 +145,16 @@ end;
function GetDefaultLCLWidgetType: string;
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;
function GetDefaultLCLLibPaths(const Prefix, Postfix, Separator: string): string;