1module Generate.JavaScript (generate) where
3import Control.Monad.State as State
4import Language.ECMAScript3.PrettyPrint as ES
5import qualified Text.PrettyPrint.Leijen as PP
7import qualified AST.Module as Module
8import qualified Generate.JavaScript.Expression as JS
11generate :: Module.Optimized -> String
12generate (Module.Module _ _ info) =
15 concat <$> mapM JS.generateDef (Module.program info)
18 State.evalState genBody 0
20 PP.displayS (PP.renderPretty 1 160 (ES.prettyPrint body)) ""
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list