codetools: fixed nested comments for compiler mode fpc

git-svn-id: trunk@31022 -
This commit is contained in:
mattias 2011-06-03 14:21:28 +00:00
parent 03e335fd0e
commit dfe60001a1
23 changed files with 6 additions and 98 deletions

View File

@ -219,7 +219,6 @@ ResourceString
ctsFreePascalSourceDir = 'Free Pascal Source Directory';
ctsSrcPathInitialization = 'SrcPath Initialization';
ctsUnitPathInitialization = 'UnitPath Initialization';
ctsNestedCommentsOn = 'Nested Comments On';
ctsDefineLCL = 'Define LCL';
ctsDefineLCLWidgetset = 'Define LCLwidgetset, e.g. LCLgtk';
ctsFPDocSystemOn = 'enable FPDocSystem';

View File

@ -1983,10 +1983,6 @@ begin
DefTempl:=TDefineTemplate.Create('Reset UnitPath',
ctsUnitPathInitialization,ExternalMacroStart+'UnitPath','',da_DefineRecurse);
MainDir.AddChild(DefTempl);
// turn Nested comments on
DefTempl:=TDefineTemplate.Create('Nested Comments',
ctsNestedCommentsOn,ExternalMacroStart+'NestedComments','',da_DefineRecurse);
MainDir.AddChild(DefTempl);
// rtl
RTLDir:=TDefineTemplate.Create('RTL',ctsRuntimeLibrary,'','rtl',da_Directory);
@ -5672,14 +5668,6 @@ begin
DefTempl:=TDefineTemplate.Create('Reset UnitPath',
ctsUnitPathInitialization,ExternalMacroStart+'UnitPath','',da_DefineRecurse);
MainDir.AddChild(DefTempl);
// turn Nested comments on
DefTempl:=TDefineTemplate.Create('Nested Comments',
ctsNestedCommentsOn,ExternalMacroStart+'NestedComments','',da_DefineRecurse);
MainDir.AddChild(DefTempl);
// enable FPDocSystem to find compiler functions like writeln and readln
{DefTempl:=TDefineTemplate.Create('FPDocSystem',
ctsFPDocSystemOn,'FPDocSystem','',da_DefineRecurse);
MainDir.AddChild(DefTempl);}
// rtl
RTLDir:=TDefineTemplate.Create('RTL',ctsRuntimeLibrary,'','rtl',da_Directory);
@ -5995,9 +5983,6 @@ begin
ExternalMacroStart+'SrcPath',
d(LazarusSrcDir+'/lcl/nonwin32;')+SrcPath,da_DefineRecurse));
MainDir.AddChild(IfTemplate);
// turn Nested comments on
MainDir.AddChild(TDefineTemplate.Create('Nested Comments',
ctsNestedCommentsOn,ExternalMacroStart+'NestedComments','',da_DefineRecurse));
// define 'LCL'
MainDir.AddChild(TDefineTemplate.Create('define LCL',
ctsDefineLCL,'LCL',WidgetType,da_DefineRecurse));

View File

@ -637,10 +637,6 @@ msgstr "Directori %s"
msgid "%s Project"
msgstr "Projecte %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Activa els comentaris niats"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -638,10 +638,6 @@ msgstr "%s Adresář"
msgid "%s Project"
msgstr "%s Projekt"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Zapnuty vnořené komentáře"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Vnořené definice %s nejsou povoleny"

View File

@ -640,10 +640,6 @@ msgstr "Verzeichnis %s"
msgid "%s Project"
msgstr "Projekt %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Geschachtelte Kommentare An"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Geschachtelte %s-Definitionen sind nicht zulässig"

View File

@ -637,10 +637,6 @@ msgstr "Directorio %s"
msgid "%s Project"
msgstr "%s Proyecto"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Comentarios anidados"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Las definiciones %s anidadas no están permitidas"

View File

@ -636,10 +636,6 @@ msgstr "Directorio %s"
msgid "%s Project"
msgstr "%s Proyecto"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Comentarios anidados"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -630,10 +630,6 @@ msgstr ""
msgid "%s Project"
msgstr ""
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr ""
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -638,10 +638,6 @@ msgstr "Répertoire %s"
msgid "%s Project"
msgstr "Projet %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Commentaires imbriqués sur"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "On ne permet pas des définitions imbriqués %s"

View File

@ -637,10 +637,6 @@ msgstr "תיקייה s%"
msgid "%s Project"
msgstr "פרוייקט s%"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "מצב הערות מקוננות פועל"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "הגדרות מקוננות s% אסורות"

View File

@ -638,10 +638,6 @@ msgstr " Direktori %s"
msgid "%s Project"
msgstr "%s Proyek"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Komentar Berulang On"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Pengulangan definisi %s tidak dibolehkan"

View File

@ -635,10 +635,6 @@ msgstr "Directory %s"
msgid "%s Project"
msgstr "Progetto %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Commenti nidificati abilitati"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Le definizioni annidate %s non sono permesse"

View File

@ -639,10 +639,6 @@ msgstr "%s aplankas"
msgid "%s Project"
msgstr "%s projektas"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Įdėtiniai komentarai įgalinti"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Įdėtinės %s apibrėžtys neleidžiamos"

View File

@ -637,10 +637,6 @@ msgstr ""
msgid "%s Project"
msgstr ""
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr ""
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -641,10 +641,6 @@ msgstr "katalog %s"
msgid "%s Project"
msgstr "%s Projekt"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Włączone zagnieżdżanie komentarzy"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -630,10 +630,6 @@ msgstr ""
msgid "%s Project"
msgstr ""
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr ""
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -637,10 +637,6 @@ msgstr "Diretório %s"
msgid "%s Project"
msgstr "Projeto %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Comentários Aninhados no"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Definições aninhadas %s não são permitidas"

View File

@ -637,10 +637,6 @@ msgstr "Diretório %s"
msgid "%s Project"
msgstr "Projeto %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Comentários Aninhados no"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Definições aninhadas %s não são permitidas"

View File

@ -636,10 +636,6 @@ msgstr "Каталог %s"
msgid "%s Project"
msgstr "Проект %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Включить вложенные комментарии"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Вложенные определения %s не разрешаются"

View File

@ -636,10 +636,6 @@ msgstr ""
msgid "%s Project"
msgstr ""
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr ""
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr ""

View File

@ -635,10 +635,6 @@ msgstr "Тека %s"
msgid "%s Project"
msgstr "Проект %s"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "Ввімкн. вкладені коментарі"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "Вкладені %s визначення не дозволені"

View File

@ -640,10 +640,6 @@ msgstr "%s 目录"
msgid "%s Project"
msgstr "%s 工程"
#: codetoolsstrconsts.ctsnestedcommentson
msgid "Nested Comments On"
msgstr "开启注释嵌套"
#: codetoolsstrconsts.ctsnesteddefinitionsarenotallowed
msgid "Nested %s definitions are not allowed"
msgstr "不允许嵌套定义 %s"

View File

@ -774,9 +774,9 @@ begin
FMainSourceFilename:='';
FIncludeStack:=TFPList.Create;
FPascalCompiler:=pcFPC;
FNestedComments:=true;
FCompilerMode:=cmFPC;
FCompilerModeSwitches:=DefaultCompilerModeSwitches[CompilerMode];
FNestedComments:=cmsNested_comment in CompilerModeSwitches;
end;
procedure TLinkScanner.DecCommentLevel;
@ -1284,9 +1284,9 @@ begin
ScannedRange:=lsrNone;
CommentStyle:=CommentNone;
CommentLevel:=0;
FNestedComments:=false;
PascalCompiler:=pcFPC;
CompilerMode:=cmFPC;
FNestedComments:=cmsNested_comment in DefaultCompilerModeSwitches[CompilerMode];
IfLevel:=0;
FSkippingDirectives:=lssdNone;
//DebugLn('TLinkScanner.Scan D --------');
@ -1309,6 +1309,10 @@ begin
break;
end;
// nested comments override
if Values.IsDefined(ExternalMacroStart+'NestedComments') then
FNestedComments:=true;
//DebugLn(['TLinkScanner.Scan ',MainFilename,' ',PascalCompilerNames[PascalCompiler],' ',CompilerModeNames[CompilerMode],' FNestedComments=',FNestedComments]);
//DebugLn(Values.AsString);