firefly-compiler 0.5.6 → 0.5.8
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.
- package/compiler/JsEmitter.ff +285 -114
- package/compiler/Parser.ff +5 -5
- package/compiler/Token.ff +8 -0
- package/compiler/Tokenizer.ff +3 -3
- package/core/JsValue.ff +21 -22
- package/core/List.ff +2 -15
- package/output/js/ff/compiler/JsEmitter.mjs +1545 -527
- package/output/js/ff/compiler/Parser.mjs +14 -10
- package/output/js/ff/compiler/Token.mjs +138 -70
- package/output/js/ff/compiler/Tokenizer.mjs +4 -4
- package/output/js/ff/core/Core.mjs +18 -4
- package/output/js/ff/core/JsValue.mjs +34 -34
- package/output/js/ff/core/List.mjs +0 -24
- package/package.json +1 -1
- package/vscode/package.json +1 -1
package/core/List.ff
CHANGED
|
@@ -231,7 +231,7 @@ extend self[T]: List[T] {
|
|
|
231
231
|
await body_(self_[i], $task)
|
|
232
232
|
}
|
|
233
233
|
"""
|
|
234
|
-
|
|
234
|
+
|
|
235
235
|
eachWhile(body: T => Bool): Unit
|
|
236
236
|
target js sync "for(const value of self_) if(!body_(value)) break"
|
|
237
237
|
target js async "for(const value of self_) if(!await body_(value, $task)) break"
|
|
@@ -308,19 +308,6 @@ extend self[T]: List[T] {
|
|
|
308
308
|
return result;
|
|
309
309
|
"""
|
|
310
310
|
|
|
311
|
-
map2[S](body: T => S): List[S] {
|
|
312
|
-
if(!UnsafeJs.inAsync()) {
|
|
313
|
-
self!->map(body!)?
|
|
314
|
-
} else {
|
|
315
|
-
let result = Array.new()
|
|
316
|
-
0.until(self.size()).each {i =>
|
|
317
|
-
result.push(body(self.grab(i)))
|
|
318
|
-
}
|
|
319
|
-
result.drain()
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
311
|
flatMap[S](body: T => List[S]): List[S] {
|
|
325
312
|
let results = Array.new()
|
|
326
313
|
self.each {x =>
|
|
@@ -377,7 +364,7 @@ extend self[T]: List[T] {
|
|
|
377
364
|
}
|
|
378
365
|
array.drain()
|
|
379
366
|
}
|
|
380
|
-
|
|
367
|
+
|
|
381
368
|
}
|
|
382
369
|
|
|
383
370
|
extend self[T: Order]: List[T] {
|