@makano/rew 1.2.91 → 1.2.92

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,6 +59,7 @@ function typef(fn, returnType) {
59
59
  return result;
60
60
  }
61
61
  wrappedFn.returnType = returnType;
62
+ wrappedFn.type = returnType;
62
63
  return wrappedFn;
63
64
  }
64
65
  typef.is = function(func, returnType){
@@ -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){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.91",
3
+ "version": "1.2.92",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {