mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 20:49:27 +02:00
codetools: class var/type section for generics
git-svn-id: trunk@23407 -
This commit is contained in:
parent
227801c427
commit
171d63e5c4
@ -101,6 +101,10 @@ ResourceString
|
||||
ctsPointHintProcStartAt = '. Hint: proc start at ';
|
||||
ctsMissingPointAfterEnd = 'missing . after end';
|
||||
ctsEndForClassNotFound = '"end" for class/object not found';
|
||||
ctsVarIsOnlyAllowedInGenericsEndOfClassNotFound = 'var is only allowed in '
|
||||
+'generics, end of class not found';
|
||||
ctsTypeIsOnlyAllowedInGenericsEndOfClassNotFound = 'type is only allowed in '
|
||||
+'generics, end of class not found';
|
||||
ctsUnexpectedSubRangeOperatorFound = 'unexpected subrange operator ''..'' found';
|
||||
ctsInvalidSubrange = 'invalid subrange';
|
||||
ctsExportsClauseOnlyAllowedInLibraries = 'exports clause only allowed in libraries';
|
||||
|
@ -735,6 +735,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "identificador del tipus"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "no s'ha trobat la secció del tipus de la classe"
|
||||
@ -811,6 +815,10 @@ msgstr "la unitat utilitzada no és una unitat Pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Directoris de les utilitats"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Directori dels ginys"
|
||||
|
@ -738,6 +738,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "Typbezeichner"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "Typabschnitt der Klasse nicht gefunden"
|
||||
@ -814,6 +818,10 @@ msgstr "die verwendete Unit ist keine Pascal-Unit"
|
||||
msgid "Utils directories"
|
||||
msgstr "Utils-Verzeichnis"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Widget-Verzeichnis"
|
||||
|
@ -735,6 +735,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "identificador de tipo"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "sección type de clase no encontrada"
|
||||
@ -811,6 +815,10 @@ msgstr "la unidad usada no es una unidad Pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Directorios de utilidades"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Directorio de Widget"
|
||||
|
@ -734,6 +734,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "tipo de identificador"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "sección type de class no encontrado"
|
||||
@ -810,6 +814,10 @@ msgstr "unidad usada no es una unidad Pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Directorios de utilidades"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Directorio de Widget"
|
||||
|
@ -730,6 +730,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr ""
|
||||
@ -806,6 +810,10 @@ msgstr ""
|
||||
msgid "Utils directories"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr ""
|
||||
|
@ -736,6 +736,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "type d'identificateur"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "type de section de la classe non trouvé"
|
||||
@ -812,6 +816,10 @@ msgstr "l'unité utilisée n'est pas une unité Pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Répertoires des utilitaires"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Répertoire des éléments graphiques (Widgets)"
|
||||
|
@ -736,6 +736,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "pengenal type"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "bagian type dari class tidak ditemukan"
|
||||
@ -812,6 +816,10 @@ msgstr "unit yang digunakan bukan unit pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Direktori Utils"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Direktori Widget"
|
||||
|
@ -734,6 +734,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "identificatore di tipo"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "tipo si selezione di classe non trovata"
|
||||
@ -810,6 +814,10 @@ msgstr "la unit utilizzata non è una unit pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Directory delle utility"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Directory widget"
|
||||
|
@ -738,6 +738,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "tipo identifikatorius"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "klasėje nerasta tipo sekcija"
|
||||
@ -814,6 +818,10 @@ msgstr "naudojamas modulis n4ra paskalio modulis"
|
||||
msgid "Utils directories"
|
||||
msgstr "Paslaugų programų aplankai"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Valdiklių aplankas"
|
||||
|
@ -735,6 +735,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "type sectie van klasse niet gevonden"
|
||||
@ -811,6 +815,10 @@ msgstr "gebruikte unit is geen pascal unit"
|
||||
msgid "Utils directories"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr ""
|
||||
|
@ -735,6 +735,10 @@ msgstr "tipo"
|
||||
msgid "type identifier"
|
||||
msgstr "tipo identificador"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "seção de tipo da classe não encontrada"
|
||||
@ -811,6 +815,10 @@ msgstr "unidade usada não é unidade Pascal"
|
||||
msgid "Utils directories"
|
||||
msgstr "Diretório de Utilitários"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Diretório \"Widget\""
|
||||
|
@ -739,6 +739,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "identyfikator typu"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "brakuje sekcji typu klasy "
|
||||
@ -815,6 +819,10 @@ msgstr "użyty moduł nie jest modułem pascalowym"
|
||||
msgid "Utils directories"
|
||||
msgstr "Katalogi narzedzi"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Katalog widgetów"
|
||||
|
@ -730,6 +730,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr ""
|
||||
@ -806,6 +810,10 @@ msgstr ""
|
||||
msgid "Utils directories"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr ""
|
||||
|
@ -735,6 +735,10 @@ msgstr "тип"
|
||||
msgid "type identifier"
|
||||
msgstr "идентификатор типа"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "секция type класса не найдена"
|
||||
@ -811,6 +815,10 @@ msgstr "используемый модуль не является модуле
|
||||
msgid "Utils directories"
|
||||
msgstr "Каталоги утилит"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Каталог виджетов"
|
||||
|
@ -736,6 +736,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr ""
|
||||
@ -812,6 +816,10 @@ msgstr ""
|
||||
msgid "Utils directories"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr ""
|
||||
|
@ -730,6 +730,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "ідентифікатор типу"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "не знайдена секція типу класу"
|
||||
@ -806,6 +810,10 @@ msgstr "цей модуль не є паскалівським"
|
||||
msgid "Utils directories"
|
||||
msgstr "Теки інструментів"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "Тека елементів інтерфейсу"
|
||||
|
@ -738,6 +738,10 @@ msgstr ""
|
||||
msgid "type identifier"
|
||||
msgstr "类型标识符"
|
||||
|
||||
#: codetoolsstrconsts.ctstypeisonlyallowedingenericsendofclassnotfound
|
||||
msgid "type is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctstypesectionofclassnotfound
|
||||
msgid "type section of class not found"
|
||||
msgstr "未找到类的类型块"
|
||||
@ -814,6 +818,10 @@ msgstr "use的单元不是一个pascal单元"
|
||||
msgid "Utils directories"
|
||||
msgstr "单元目录"
|
||||
|
||||
#: codetoolsstrconsts.ctsvarisonlyallowedingenericsendofclassnotfound
|
||||
msgid "var is only allowed in generics, end of class not found"
|
||||
msgstr ""
|
||||
|
||||
#: codetoolsstrconsts.ctswidgetdirectory
|
||||
msgid "Widget Directory"
|
||||
msgstr "窗口部件目录"
|
||||
|
@ -1068,6 +1068,7 @@ begin
|
||||
EndChildNode;
|
||||
// start new section
|
||||
CreateChildNode;
|
||||
if UpAtomIs('CLASS') then ReadNextAtom;
|
||||
ReadNextAtom;
|
||||
if UpAtomIs('PUBLIC') then
|
||||
CurNode.Desc:=ctnClassTypePublic
|
||||
@ -1094,6 +1095,13 @@ begin
|
||||
end;
|
||||
|
||||
function TPascalParserTool.KeyWordFuncClassVarSection: boolean;
|
||||
{
|
||||
var private
|
||||
var protected
|
||||
var public
|
||||
var published
|
||||
class var private
|
||||
}
|
||||
begin
|
||||
// end last section
|
||||
CurNode.EndPos:=CurPos.StartPos;
|
||||
@ -1101,6 +1109,7 @@ begin
|
||||
// start new section
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnClassVarPublic;
|
||||
if UpAtomIs('CLASS') then ReadNextAtom;
|
||||
ReadNextAtom;
|
||||
if UpAtomIs('PUBLIC') then
|
||||
CurNode.Desc:=ctnClassVarPublic
|
||||
@ -1119,9 +1128,9 @@ function TPascalParserTool.KeyWordFuncClassClass: boolean;
|
||||
{ parse
|
||||
class procedure
|
||||
class property
|
||||
class var
|
||||
class type
|
||||
}
|
||||
var
|
||||
p: PChar;
|
||||
begin
|
||||
ReadNextAtom;
|
||||
if UpAtomIs('PROCEDURE') or UpAtomIs('FUNCTION') then begin
|
||||
@ -1130,6 +1139,9 @@ begin
|
||||
end else if UpAtomIs('PROPERTY') then begin
|
||||
UndoReadNextAtom;
|
||||
Result:=KeyWordFuncClassProperty;
|
||||
end else if UpAtomIs('VAR') then begin
|
||||
UndoReadNextAtom;
|
||||
Result:=KeyWordFuncClassVarSection;
|
||||
end else
|
||||
RaiseStringExpectedButAtomFound('procedure');
|
||||
end;
|
||||
@ -3489,12 +3501,14 @@ begin
|
||||
'T':
|
||||
if CompareSrcIdentifiers(p,'TYPE')
|
||||
and (not CurNode.HasParentOfType(ctnGenericType)) then
|
||||
SaveRaiseException(ctsEndForClassNotFound);
|
||||
SaveRaiseException(
|
||||
ctsTypeIsOnlyAllowedInGenericsEndOfClassNotFound);
|
||||
'V':
|
||||
if CompareSrcIdentifiers(p,'VAR')
|
||||
and (BracketLvl=0)
|
||||
and (not CurNode.HasParentOfType(ctnGenericType)) then
|
||||
SaveRaiseException(ctsEndForClassNotFound);
|
||||
SaveRaiseException(ctsVarIsOnlyAllowedInGenericsEndOfClassNotFound
|
||||
);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user