@makano/rew 1.2.89 → 1.2.901
Sign up to get free protection for your applications and to get access to all the features.
package/lib/rew/const/usage.js
CHANGED
@@ -139,7 +139,7 @@ function declareAlias(aliases, token) {
|
|
139
139
|
straceLog('==> DECLARE', name, 'as', value);
|
140
140
|
|
141
141
|
let aliasValue = value.startsWith('${')
|
142
|
-
? new Function('token', 'tokens', 'code', 'hooks', value.slice(2, -1))
|
142
|
+
? new Function('token', 'tokens', 'code', 'hooks', 'index', 'setIndex', value.slice(2, -1))
|
143
143
|
: value;
|
144
144
|
|
145
145
|
|
@@ -172,7 +172,7 @@ function declareAlias(aliases, token) {
|
|
172
172
|
let nextToken = gnextToken(index, offset+1, tokens);
|
173
173
|
const args = nextToken.token.value;
|
174
174
|
setIndex(ti + offset);
|
175
|
-
return `${nextToken2.value} = ${token.value}
|
175
|
+
return `${nextToken2.value} = ${token.value} ${args && args !== '(' ? `${args},` : ''} ${params.trim()}, ${args == '(' ? args : ''}`;
|
176
176
|
} else if(nextToken?.value == ' ' && (isDecOnly || nextToken2?.token.value == '=' || nextToken2?.token.value == ':')){
|
177
177
|
nextToken.value = '';
|
178
178
|
if(isDecOnly){
|
@@ -229,10 +229,10 @@ const includeFile = (includeContent, options) => {
|
|
229
229
|
straceLog('==> INCLUDE PACKAGE', filename);
|
230
230
|
if(existsSync(pathname)) r = _inc(pathname);
|
231
231
|
}
|
232
|
-
if(
|
233
|
-
return
|
232
|
+
if(dontInclude){
|
233
|
+
return 'intentional-nothing';
|
234
234
|
}
|
235
|
-
return
|
235
|
+
return r;
|
236
236
|
}
|
237
237
|
|
238
238
|
function useImp(token, options){
|
@@ -518,7 +518,7 @@ function compileRewStuff(content, options) {
|
|
518
518
|
const includeContent = token.value.split(' ')[1].trim() || '';
|
519
519
|
const r = includeFile(includeContent, options);
|
520
520
|
if(r){
|
521
|
-
result += r;
|
521
|
+
result += r == 'intentional-nothing' ? '' : r;
|
522
522
|
aliases = {
|
523
523
|
...aliases,
|
524
524
|
...execOptions._syntaxAliases
|
@@ -540,8 +540,6 @@ const compileCivetStuff = (file, options) => {
|
|
540
540
|
straceLog('OPTION_PREPARE() for CURRENTFILE as', preCompileOptions);
|
541
541
|
const prepared = compileRewStuff(file.content, preCompileOptions);
|
542
542
|
|
543
|
-
// console.log(prepared);
|
544
|
-
|
545
543
|
const compileOptions = {
|
546
544
|
...preCompileOptions,
|
547
545
|
bare: true,
|