11export function postprocess ( code : string , seclevel : number , uniqueID : string ) {
22 return code
33 . replace ( / ^ f u n c t i o n \s * \w + \( / , `function(` )
4- . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\\\\\\\$SC_DOLLAR\\$` , `g` ) , `SC\\ $` )
5- . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\\\\\\\$DB_DOLLAR\\$` , `g` ) , `DB\\ $` )
6- . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\\\\\\\$D\\$` , `g` ) , `__D_\\S ` )
7- . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\\\\\\\$FMCL\\$` , `g` ) , `__FMCL\\_ ` )
8- . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\\\\\\\$G\\$` , `g` ) , `__G\\_ ` )
4+ . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\(?: \\\\)? \\$SC_DOLLAR\\$` , `g` ) , `S\\C $` )
5+ . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\(?: \\\\)? \\$DB_DOLLAR\\$` , `g` ) , `D\\B $` )
6+ . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\(?: \\\\)? \\$D\\$` , `g` ) , `_\\_D_S ` )
7+ . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\(?: \\\\)? \\$FMCL\\$` , `g` ) , `_\\_FMCL_ ` )
8+ . replace ( new RegExp ( `\\$${ uniqueID } \\$\\\\(?: \\\\)? \\$G\\$` , `g` ) , `_\\_G_ ` )
99 . replace ( new RegExp ( `\\$${ uniqueID } \\$SUBSCRIPT\\$(\\w+)\\$(\\w+)` , `g` ) , `#${ `nlmhf` [ seclevel ] } s.$1.$2` )
1010 . replace ( new RegExp ( `\\$${ uniqueID } \\$DEBUG` , `g` ) , `#D` )
1111 . replace ( new RegExp ( `\\$${ uniqueID } \\$FMCL` , `g` ) , `#FMCL` )
@@ -15,7 +15,7 @@ export function postprocess(code: string, seclevel: number, uniqueID: string) {
1515 . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_A_SUBSCRIPT\\$(#[\\w\\.]+)\\(\\$` , `g` ) , `$1\\(` )
1616 . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_A_DB_CALL\\$(\\w+)\\$` , `g` ) , `#db.$1\\(` )
1717 . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_A_DEBUG_CALL\\$` , `g` ) , `#D\\(` )
18- . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_FMCL\\$` , `g` ) , `#FMC\\L ` )
18+ . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_FMCL\\$` , `g` ) , `#\\FMCL ` )
1919 . replace ( new RegExp ( `\\$${ uniqueID } \\$NOT_G\\$` , `g` ) , `#\\G` )
2020}
2121
0 commit comments