Commit Graph

22 Commits

Author SHA1 Message Date
ringabout
39629a1adc fixes JS semicolon omissions (#23896) 2024-07-26 20:45:52 +02:00
ASVIEST
20d79c9fb0 Deprecate asm stmt for js target (#23149)
why ?

- We already have an emit that does the same thing
- The name asm itself is a bit confusing, you might think it's an alias
for asm.js or something else.
- The asm keyword is used differently on different compiler targets (it
makes it inexpressive).
- Does anyone (other than some compiler libraries) use asm instead of
emit ? If yes, it's a bit strange to use asm somewhere and emit
somewhere. By making the asm keyword for js target deprecated, there
would be even less use of the asm keyword for js target, reducing the
amount of confusion.
- New users might accidentally use a non-universal approach via the asm
keyword instead of emit, and then when they learn about asm, try to
figure out what the differences are.

see https://forum.nim-lang.org/t/10821

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2024-01-02 07:49:54 +01:00
Jake Leahy
44b64e726e Don't recurse into inner functions during asyncjs transform (#23036)
Closes #13341
2023-12-06 04:59:38 +01:00
Jake Leahy
cac49694c0 std/asyncjs allow transforming proc types (#21356)
* Add test case

* Implement JS async transform for nnkProcTy
2023-02-14 08:14:19 +01:00
Andrey Makarov
19ff746916 Markdown code blocks migration part 7 (#20547) 2022-10-12 16:13:43 +02:00
Juan Carlos
f0bfc0bd3f Remove define for jsfetch (#19530)
* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch

* Remove define nimExperimentalAsyncjsThen for std/asyncjs.then and std/jsfetch
2022-02-25 20:34:16 +01:00
Timothee Cour
2abc936d51 typeof(voidStmt) now works (#17807)
* `typeof(voidStmt)` now works
* remove typeOrVoid
* add condsyms, and reference cligen https://github.com/c-blake/cligen/pull/193
* fixup
* changelog [skip ci]
* fixup
2021-04-23 14:36:38 +02:00
konsumlamm
9997b42c35 Use importjs (#17422) 2021-03-19 14:22:48 -07:00
Timothee Cour
a66637bda4 followup #16871 asyncjs.then: allow pipelining procs returning futures (#17189)
* followup #16871 asyncjs.then: allow pipelining procs returning futures
* rename test files where they belong
* fix tests
* tests for then with `onReject` callback
* rename test file containing fail to avoid messing with grep
* address comments
* cleanup
* un-disable 1 test
2021-03-04 14:00:04 +01:00
flywind
ec068a2687 fix #17177 (#17243)
* remove unnecessary when statement

* remove outdated codes

* fix #17177

* add testcase
2021-03-03 11:57:34 +01:00
Timothee Cour
a4e6b242d5 asyncjs: add then, catch for promise pipelining (#16871)
* asyncjs: add then
* improve tests, changelog, API
* fix cryptic windows error: The parameter is incorrect
* address comments
2021-02-24 21:03:21 +01:00
flywind
fe20492f05 clean up the docs of some modules under lib/js (#16579) 2021-01-04 19:54:33 +01:00
Zed
3b4952da94 Fix header inconsistencies in documentation (#11071) 2019-04-23 08:40:20 +02:00
LemonBoy
90025e242d Minor fixes for asyncjs (#8894)
* Minor fixes for asyncjs

Mark internal procedures as used
Allow .async. for more node kinds
Make .async. work for nkStmtList

* Fix logic error in both the async macros
2018-09-07 16:42:38 +02:00
Alexander Ivanov
b6c69dd45e Use addPragma 2018-03-05 10:28:17 +02:00
Alexander Ivanov
3bffbf5a4d Stop replacing all pragmas of a function with asyncjs 2018-03-03 16:53:28 +02:00
Alexander Ivanov
9c7374abcd Fix return (#7225) 2018-02-27 15:23:19 +01:00
Yuriy Glukhov
c93655e8b4 Unify async macro and futures for js and native targets 2018-01-05 16:40:51 +02:00
Alexander Ivanov
eba544996d Fix docs! 2017-12-20 14:11:22 +02:00
Alexander Ivanov
b3dfc93bee Fix forward 2017-12-19 20:50:37 +02:00
Alexander Ivanov
7f6afa9e9b Make asyncjs Future[void] play nicely with last line discardable calls 2017-12-19 13:57:37 +02:00
Alexander Ivanov
a9ba02e8c9 added asyncjs standard library module (#6841) 2017-12-19 00:34:54 +01:00