mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-27 13:43:28 +03:00
Merge pull request #436 from edwinb/update-js
Update JS code generator to remove RF
This commit is contained in:
commit
b955d2e50c
@ -56,6 +56,7 @@ Compiler changes:
|
||||
* It is now possible to create new backends with minimal overhead. `Idris.Driver`
|
||||
exposes the function `mainWithCodegens` that takes a list of codegens. The
|
||||
feature in documented [here](https://idris2.readthedocs.io/en/latest/backends/custom.html).
|
||||
* New code generators `node` and `js`.
|
||||
|
||||
REPL changes:
|
||||
|
||||
|
@ -60,4 +60,5 @@ or via the `IDRIS2_CG` environment variable.
|
||||
chez
|
||||
racket
|
||||
gambit
|
||||
javascript
|
||||
custom
|
||||
|
5
docs/source/backends/javascript.rst
Normal file
5
docs/source/backends/javascript.rst
Normal file
@ -0,0 +1,5 @@
|
||||
***********************************
|
||||
Javascript and Node Code Generators
|
||||
***********************************
|
||||
|
||||
To be added.
|
@ -84,7 +84,6 @@ jsName (UN n) = keywordSafe $ jsIdent n
|
||||
jsName (MN n i) = jsIdent n ++ "_" ++ show i
|
||||
jsName (PV n d) = "pat__" ++ jsName n
|
||||
jsName (DN _ n) = jsName n
|
||||
jsName (RF n) = "rf__" ++ jsIdent n
|
||||
jsName (Nested (i, x) n) = "n__" ++ show i ++ "_" ++ show x ++ "_" ++ jsName n
|
||||
jsName (CaseBlock x y) = "case__" ++ jsIdent x ++ "_" ++ show y
|
||||
jsName (WithBlock x y) = "with__" ++ jsIdent x ++ "_" ++ show y
|
||||
|
Loading…
Reference in New Issue
Block a user