|
@@ -139,6 +139,7 @@ type
|
|
CompileStamp : longint;
|
|
CompileStamp : longint;
|
|
CodeCompleteTip: PFPToolTip;
|
|
CodeCompleteTip: PFPToolTip;
|
|
{for nested comments managment}
|
|
{for nested comments managment}
|
|
|
|
+ SwitchesNestedComments : boolean;
|
|
NestedComments : boolean;
|
|
NestedComments : boolean;
|
|
FixedNestedComments : TPoint;
|
|
FixedNestedComments : TPoint;
|
|
NestnessPoints:TNestnessPoints;
|
|
NestnessPoints:TNestnessPoints;
|
|
@@ -1382,10 +1383,11 @@ begin
|
|
IsAsmReservedWord:=IsFPAsmReservedWord(S);
|
|
IsAsmReservedWord:=IsFPAsmReservedWord(S);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TSourceEditor.ParseSourceNestedComments(X,Y : sw_integer): boolean;
|
|
|
|
const cModeNestedComments : array [TCompilerMode] of boolean =
|
|
const cModeNestedComments : array [TCompilerMode] of boolean =
|
|
(false,true{fpc},true{objfpc},false,false,false,false,false,false,false);
|
|
(false,true{fpc},true{objfpc},false,false,false,false,false,false,false);
|
|
|
|
|
|
|
|
+function TSourceEditor.ParseSourceNestedComments(X,Y : sw_integer): boolean;
|
|
|
|
+
|
|
function CompilerModeToNestedComments(AMode: String; ACurrentNestedComments:boolean):boolean;
|
|
function CompilerModeToNestedComments(AMode: String; ACurrentNestedComments:boolean):boolean;
|
|
var SourceCompilerMode : TCompilerMode;
|
|
var SourceCompilerMode : TCompilerMode;
|
|
begin
|
|
begin
|
|
@@ -1441,6 +1443,7 @@ var CurrentCompilerMode : TCompilerMode;
|
|
begin
|
|
begin
|
|
CurrentCompilerMode:=TCompilerMode(CompilerModeSwitches^.GetCurrSelParamID);
|
|
CurrentCompilerMode:=TCompilerMode(CompilerModeSwitches^.GetCurrSelParamID);
|
|
NestedComments:=cModeNestedComments[CurrentCompilerMode];
|
|
NestedComments:=cModeNestedComments[CurrentCompilerMode];
|
|
|
|
+ SwitchesNestedComments:=NestedComments;
|
|
ParseSourceNestedComments:=NestedComments;
|
|
ParseSourceNestedComments:=NestedComments;
|
|
ResultIsSet:=false;
|
|
ResultIsSet:=false;
|
|
RegisterNestnessPoint(0,0);
|
|
RegisterNestnessPoint(0,0);
|
|
@@ -1617,7 +1620,7 @@ begin
|
|
IsNestedComments:=NestedComments;
|
|
IsNestedComments:=NestedComments;
|
|
end else
|
|
end else
|
|
begin
|
|
begin
|
|
- lastNC:=NestedComments;
|
|
|
|
|
|
+ lastNC:=SwitchesNestedComments;
|
|
if NestPos>0 then
|
|
if NestPos>0 then
|
|
for iPos:=0 to NestPos-1 do
|
|
for iPos:=0 to NestPos-1 do
|
|
begin
|
|
begin
|
|
@@ -1673,6 +1676,9 @@ var Points : TNestnessPoints;
|
|
iPos,iFrom,oNest : sw_integer;
|
|
iPos,iFrom,oNest : sw_integer;
|
|
begin
|
|
begin
|
|
NestedCommentsChangeCheck:=false;
|
|
NestedCommentsChangeCheck:=false;
|
|
|
|
+ if SwitchesNestedComments<>cModeNestedComments[TCompilerMode(CompilerModeSwitches^.GetCurrSelParamID)] then
|
|
|
|
+ FixedNestedComments.Y:=2000000; {force to parse again}
|
|
|
|
+
|
|
if (FixedNestedComments.Y>=CurLine) then
|
|
if (FixedNestedComments.Y>=CurLine) then
|
|
begin
|
|
begin
|
|
if FixedNestedComments.Y>=2000000 then
|
|
if FixedNestedComments.Y>=2000000 then
|