language-ecmascript

JavaScript parser and pretty-printer library http://github.com/jswebtools/language-ecmascript

Version on this page:0.17.0.1
LTS Haskell 9.10:0.17.2.0
Stackage Nightly 2017-07-25:0.17.2.0
Latest on Hackage:0.17.2.0
BSD3 licensed by Andrey Chudnov, Arjun Guha, Spiridon Aristides Eliopoulos, Joe Gibbs Politz, Claudiu Saftoiu
Maintained by Andrey Chudnov

Module documentation for 0.17.0.1

There are no documented modules for this package.

Tools for working with ECMAScript 3 (popularly known as JavaScript). Includes a parser, pretty-printer, tools for working with source tree annotations and an arbitrary instance. See CHANGELOG for a summary of changes. The package follows the Haskell Package Versioning Policy since version 0.17.0.1.

Changes

Version change log.

=0.17.2.0=
Issue #82: Tighter lexing of identifiers using Unicode character classes (thanks @berdario).

Dependency version bumps.

=0.17.1.0=
Improvements to pretty-printing (Github PR #78) + fixed a bug in quasi-quotation (Github PR #77).

=0.17.0.2=
Fixed a bug in the Arbitrary instance: no longer generating empty list expressions. Dependency bounds update.

=0.17.0.1=
Dependency bounds update.

=0.17=
Added helper functions for code generation (see Language.ECMAScript3.Syntax.CodeGen). Bug fixes to the Arbitrary instances.

=0.16.2=
Build fixes for GHC 7.4.2 and 7.8.2.

=0.16.1=
Removed unicode-escaping of illegal identifier characters in the
pretty-printer. Adjusted the isValid predicate to check for illegal
characters identifiers. Adjusted the Arbitrary instance to only produce
valid identifier names.

=0.16=
Rewritten the Arbitrary instances using 'testing-feat'. Adjusted the
pretty-printer to escape invalid characters in identifier names
automatically, which gives better usability in code generation use-cases.
Added an 'isValid' predicate to check the validity of the AST. Note that the
pretty-printer is guaranteed to produce syntactically correct code only
for valid ASTs.

=0.15.4=
Fixed haddock build failure.

=0.15.3=
Ported the pretty printer to use 'wl-pprint' instead of
'pretty'. Pretty-printed code is now more compact and resembles common
formatting conventions. Fixed bugs where the pretty-printer produced
unparseable source representations for expression statements starting with
'{' or "function". Disabled the QuickCheck pretty-printer test.

=0.15.2=
Fixed an error in the .cabal file that prevented some of the test modules
to be packaged.

=0.15.1=
Added semicolons after the "return" statement in the pretty printer to
avoid certain class of syntax error when printed code is parsed
again. Changed the pretty-printer to put the IntLit in parenthesis if it's
found on the left-side of the '.' (field access) operator.

=0.15=
Bug fixes in the pretty-printer, the parser and the QuickCheck arbitrary
instance for the AST. Refactored tests to use test-framework. Reorganized
the interface for the parser to make it consistent; see deprecation
warnings for details. Added Language.ECMAScript3.SourceDiff -- a simple
source-based differ for ECMAScript programs, which is now used for
visualizing test failures. Revised package dependencies. Factored the
analyses out in a separate package: language-ecmascript-analysis;
Language.ECMAScript3.Analysis.* are now deprecated.

=0.14=
Refactoring of the pretty-printing module: added class Pretty with a more
comprehensive coverage of AST datatypes and better documentation. Removed
duplicate code and deprecated all old interfaces (everything except class
Pretty). Old interfaces would be removed in 1.0 (still a long way out).

=0.13=
Added class PP for pretty-printing

=0.12=
Added a 'setAnnotation' function to the 'HasAnnotation' class. Added
a 'withAnnotation' helper function to modify the top level annotation.

=0.11.1=
Fixed binary operator precedence in the parser.

=0.11=
Added a simple quasi-quoter for ECMAScript (see
Language.ECMAScript3.Syntax.QuasiQuote)

=0.10=
The ParenExpr constructor was removed from the Expression AST
(WARNING: might break some builds). The pretty printer was rewritten
to automatically parenthesize sub-expressions based on operator
precedence. Added a (beta quality) arbitrary instance for all the
AST's to generate random JavaScript programs (useful for testing).


=0.9.1=
Increased the upper bound on data-default in dependencies. See
https://github.com/jswebtools/language-ecmascript/pull/5
comments powered byDisqus