@makano/rew 1.2.91 → 1.2.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,6 +86,15 @@ function tokenizeCoffeeScript(code) {
|
|
86
86
|
}
|
87
87
|
tokens.push({ type: 'IDENTIFIER', value: identifier });
|
88
88
|
i--; // Move back one character to recheck
|
89
|
+
} else if (/[a-f0-9.n]/.test(char)) {
|
90
|
+
let num = char;
|
91
|
+
i++;
|
92
|
+
while (i < code.length && /[a-f0-9.n]/.test(code[i])) {
|
93
|
+
num += code[i];
|
94
|
+
i++;
|
95
|
+
}
|
96
|
+
tokens.push({ type: 'NUMBER', value: num });
|
97
|
+
i--; // Move back one character to recheck
|
89
98
|
} else {
|
90
99
|
// Other characters
|
91
100
|
tokens.push({ type: 'OTHER', value: char });
|
@@ -172,7 +181,7 @@ function declareAlias(aliases, token) {
|
|
172
181
|
let nextToken = gnextToken(index, offset+1, tokens);
|
173
182
|
const args = nextToken.token.value;
|
174
183
|
setIndex(ti + offset);
|
175
|
-
return `${nextToken2.value} = ${token.value} ${args && args !== '(' ? `${args},` : ''} ${params.trim()}, ${args == '(' ? args : ''}
|
184
|
+
return `${nextToken2.value} = ${token.value} ${args && args !== '(' && args !== '-' && args !== '=' ? `${args},` : ''} ${params.trim()}, ${args == '(' || args == '=' || args == '-' ? args : ''}`.replace(/,(| )$/, '');
|
176
185
|
} else if(nextToken?.value == ' ' && (isDecOnly || nextToken2?.token.value == '=' || nextToken2?.token.value == ':')){
|
177
186
|
nextToken.value = '';
|
178
187
|
if(isDecOnly){
|