Skip to content

Commit

Permalink
JavaScript backend: Emit nested expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
minoki committed Oct 26, 2024
1 parent 17e13ff commit a17096e
Show file tree
Hide file tree
Showing 6 changed files with 1,111 additions and 1,110 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ sources = \
src/cps/decompose-recursive.sml \
src/cps/unpack-record-parameter.sml \
src/cps/eta.sml \
src/backend.sml \
src/nested.sml \
src/lua-syntax.sml \
src/lua-transform.sml \
Expand Down
21 changes: 21 additions & 0 deletions src/backend.sml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(*
* Copyright (c) 2024 ARATA Mizuki
* This file is part of LunarML.
*)
structure Backend:
sig
datatype lua_runtime = LUA_PLAIN | LUA_CONTINUATIONS
datatype code_style = DIRECT_STYLE | CPS
datatype backend =
BACKEND_LUA of lua_runtime
| BACKEND_LUAJIT
| BACKEND_JS of code_style
end =
struct
datatype lua_runtime = LUA_PLAIN | LUA_CONTINUATIONS
datatype code_style = DIRECT_STYLE | CPS
datatype backend =
BACKEND_LUA of lua_runtime
| BACKEND_LUAJIT
| BACKEND_JS of code_style
end;
Loading

0 comments on commit a17096e

Please sign in to comment.