language-ecmascript-0.15: JavaScript parser and pretty-printer library

Safe HaskellSafe-Inferred

Language.ECMAScript3.PrettyPrint

Description

Pretty-printing JavaScript.

Synopsis

Documentation

class Pretty a whereSource

A class of pretty-printable ECMAScript AST nodes.

Methods

prettyPrint :: a -> DocSource

Pretty-print an ECMAScript AST node. Use render or show to convert Doc to String.

javaScript :: JavaScript a -> DocSource

Deprecated: These interfaces are outdated and would be removed/hidden in version 1.0. Use the Pretty class instead.

DEPRECATED: Use prettyPrint instead! Renders a JavaScript program as a document, the show instance of Doc will pretty-print it automatically

renderStatements :: [Statement a] -> StringSource

Deprecated: These interfaces are outdated and would be removed/hidden in version 1.0. Use the Pretty class instead.

DEPRECATED: Use prettyPrint instead! Renders a list of statements as a String

renderExpression :: Expression a -> StringSource

Deprecated: These interfaces are outdated and would be removed/hidden in version 1.0. Use the Pretty class instead.

DEPRECATED: Use prettyPrint instead! Renders a list of statements as a String

class PP a whereSource

Deprecated: These interfaces are outdated and would be removed/hidden in version 1.0. Use the Pretty class instead.

Methods

pp :: a -> DocSource

Instances

Pretty a => PP a