diff --git a/CHANGELOG.md b/CHANGELOG.md index a5649bdce..bedf9e2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/docs/source/backends/index.rst b/docs/source/backends/index.rst index dc355d796..0a7712de4 100644 --- a/docs/source/backends/index.rst +++ b/docs/source/backends/index.rst @@ -60,4 +60,5 @@ or via the `IDRIS2_CG` environment variable. chez racket gambit + javascript custom diff --git a/docs/source/backends/javascript.rst b/docs/source/backends/javascript.rst new file mode 100644 index 000000000..a9e49285d --- /dev/null +++ b/docs/source/backends/javascript.rst @@ -0,0 +1,5 @@ +*********************************** +Javascript and Node Code Generators +*********************************** + +To be added. diff --git a/src/Compiler/ES/ES.idr b/src/Compiler/ES/ES.idr index 8e5caede2..9d5b7f4f5 100644 --- a/src/Compiler/ES/ES.idr +++ b/src/Compiler/ES/ES.idr @@ -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