Skip to content

Commit

Permalink
The Pretty Printer had been left out of the distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanz committed Apr 10, 2012
1 parent 93f9aec commit bc35c79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions language-javascript.cabal
Expand Up @@ -43,6 +43,7 @@ Library
Language.JavaScript.Parser.Lexer
Language.JavaScript.Parser.Grammar5
Language.JavaScript.Parser.AST
Language.JavaScript.Pretty.Printer
Other-modules: Language.JavaScript.Parser.LexerUtils
Language.JavaScript.Parser.ParseError
Language.JavaScript.Parser.ParserMonad
Expand Down
5 changes: 1 addition & 4 deletions src/Language/JavaScript/Pretty/Printer.hs
Expand Up @@ -179,11 +179,8 @@ rJS :: [JSNode] -> Foo -> Foo
rJS xs foo = foldl' (flip rn) foo xs

renderToString :: JSNode -> String
--renderToString js = map (\x -> chr (fromIntegral x)) $ LB.unpack $ BB.toLazyByteString $ renderJS js
-- need to be careful to not lose the unicode encoding on output
renderToString js = US.decode $ LB.unpack $ BB.toLazyByteString $ renderJS js
--renderToString js = lbToStr $ S8.fromChunks [ BB.toLazyByteString $ renderJS js ]
--renderToString js = lbToStr $ BB.toByteString $ renderJS js



-- ---------------------------------------------------------------------
Expand Down

0 comments on commit bc35c79

Please sign in to comment.