|
@@ -2051,9 +2051,9 @@ begin
|
|
'else':
|
|
'else':
|
|
begin
|
|
begin
|
|
if IfLvl=0 then
|
|
if IfLvl=0 then
|
|
- CfgSyntaxError('"'+Directive+'" without ifdef');
|
|
|
|
|
|
+ CfgSyntaxError('"'+Directive+'" without #ifdef');
|
|
if (Skip=skipElse) and (IfLvl=SkipLvl) then
|
|
if (Skip=skipElse) and (IfLvl=SkipLvl) then
|
|
- CfgSyntaxError('"there was already an $else');;
|
|
|
|
|
|
+ CfgSyntaxError('"there was already an #else');
|
|
if (Skip=skipIf) and (IfLvl=SkipLvl) then
|
|
if (Skip=skipIf) and (IfLvl=SkipLvl) then
|
|
begin
|
|
begin
|
|
// if-block was skipped -> execute else block
|
|
// if-block was skipped -> execute else block
|
|
@@ -2067,12 +2067,13 @@ begin
|
|
if ShowDebug then
|
|
if ShowDebug then
|
|
DebugCfgDirective('skip');
|
|
DebugCfgDirective('skip');
|
|
Skip:=skipElse;
|
|
Skip:=skipElse;
|
|
|
|
+ SkipLvl:=IfLvl;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
'elseif':
|
|
'elseif':
|
|
begin
|
|
begin
|
|
if IfLvl=0 then
|
|
if IfLvl=0 then
|
|
- CfgSyntaxError('"'+Directive+'" without ifdef');
|
|
|
|
|
|
+ CfgSyntaxError('"'+Directive+'" without #ifdef');
|
|
if (Skip=skipIf) and (IfLvl=SkipLvl) then
|
|
if (Skip=skipIf) and (IfLvl=SkipLvl) then
|
|
begin
|
|
begin
|
|
// if-block was skipped -> try this elseif
|
|
// if-block was skipped -> try this elseif
|
|
@@ -2100,7 +2101,7 @@ begin
|
|
'endif':
|
|
'endif':
|
|
begin
|
|
begin
|
|
if IfLvl=0 then
|
|
if IfLvl=0 then
|
|
- CfgSyntaxError('"'+Directive+'" without ifdef');
|
|
|
|
|
|
+ CfgSyntaxError('"'+Directive+'" without #ifdef');
|
|
dec(IfLvl);
|
|
dec(IfLvl);
|
|
if IfLvl<SkipLvl then
|
|
if IfLvl<SkipLvl then
|
|
begin
|
|
begin
|
|
@@ -2115,7 +2116,7 @@ begin
|
|
ParamFatal('user defined: '+copy(Line,p-PChar(Line)+1,length(Line)))
|
|
ParamFatal('user defined: '+copy(Line,p-PChar(Line)+1,length(Line)))
|
|
else
|
|
else
|
|
if Skip=skipNone then
|
|
if Skip=skipNone then
|
|
- CfgSyntaxError('unknown directive "'+Directive+'"')
|
|
|
|
|
|
+ CfgSyntaxError('unknown directive "#'+Directive+'"')
|
|
else
|
|
else
|
|
DebugCfgDirective('skipping unknown directive');
|
|
DebugCfgDirective('skipping unknown directive');
|
|
end;
|
|
end;
|