hjsmin-0.0.1: TODO.txt
Testing:
The following Lint has a sctrict parser
http://www.javascriptlint.com/online_lint.php
This one does not
http://www.jslint.com/
---
Language reference https://developer.mozilla.org/en/JavaScript/Reference
http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx
---
Look at
http://dean.edwards.name/download/#packer
http://code.google.com/p/minify/
Examples of parsers
JSon parser in Parsec
http://snippets.dzone.com/posts/show/3660
GOLD Parser, using the Javascript.grm from
http://www.devincook.com/GOLDParser/grammars/index.htm
http://oss.org.cn/ossdocs/web/js/js20/formal/parser-grammar.html
-------------------------
- Generate output using standard pretty print library, so it can be
used with various backends
- Sort out semicolon insertion, as per http://oss.org.cn/ossdocs/web/js/js20/rationale/syntax.html
Also: http://inimino.org/~inimino/blog/javascript_semicolons
Grammatical Semicolon Insertion
Semicolons before a closing } and the end of the program are
optional in both JavaScript 1.5 and 2.0. In addition, the
JavaScript 2.0 parser allows semicolons to be omitted before the
else of an if-else statement and before the while of a do-while
statement.
Line-Break Semicolon Insertion
If the first through the nth tokens of a JavaScript program form
are grammatically valid but the first through the n+1st tokens are
not and there is a line break between the nth tokens and the n+1st
tokens, then the parser tries to parse the program again after
inserting a VirtualSemicolon token between the nth and the n+1st
tokens.
- remove un-needed semicolons in pretty printer
- put in tests for all cases of elementList
-- Look at "in" keyword, as used : if (x in list) {}
------------
EOF