mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 18:10:17 +02:00
pastojs: fixed diable optimization using fpc syntax prepend No, issue #38045
git-svn-id: trunk@47334 -
This commit is contained in:
parent
f7050ef41a
commit
280c0d90f7
@ -3424,6 +3424,12 @@ begin
|
||||
if p=StartP then
|
||||
Error(nWarnIllegalCompilerDirectiveX,sWarnIllegalCompilerDirectiveX,['optimization']);
|
||||
OptName:=copy(Param,StartP,p-StartP);
|
||||
if lowercase(LeftStr(OptName,2))='no' then
|
||||
begin
|
||||
Delete(OptName,1,2);
|
||||
DoHandleOptimization(OptName,'-');
|
||||
exit;
|
||||
end;
|
||||
// skip whitespace
|
||||
while (p<=l) and (Param[p] in [' ',#9,#10,#13]) do
|
||||
inc(p);
|
||||
|
@ -2943,6 +2943,10 @@ procedure TPas2jsPasScanner.DoHandleOptimization(OptName, OptValue: string);
|
||||
|
||||
begin
|
||||
case lowercase(OptName) of
|
||||
'enumnumbers':
|
||||
HandleBoolean(coEnumNumbers,true);
|
||||
'usestrict':
|
||||
HandleBoolean(coUseStrict,true);
|
||||
'jsshortrefglobals':
|
||||
HandleBoolean(coShortRefGlobals,true);
|
||||
else
|
||||
|
@ -3254,6 +3254,7 @@ end.
|
||||
</li>
|
||||
<li>{$DispatchField Msg}: enable checking <i>message number</i> methods for record field name "Msg"</li>
|
||||
<li>{$DispatchStrField MsgStr}: enable checking <i>message string</i> methods for record field name "Msg"</li>
|
||||
<li>{$Optimization Name}: same as command line option -OoName</li>
|
||||
</ul>
|
||||
Defines:
|
||||
<ul>
|
||||
|
Loading…
Reference in New Issue
Block a user