66 Commits

Author SHA1 Message Date
David Greenspan
96cd1faf6b jsparse: allow unescaped / in regex char classes
Regexes like /[/]/ are ES5 compliant and supported by Node and browsers.

Needed to parse prettify.js and SockJS!
2012-12-10 15:16:23 -08:00
David Greenspan
8eacb1ab9f clarify comment 2012-12-07 18:03:52 -08:00
David Greenspan
85b502c296 jsparse: fix logic bug in lexing identifiers 2012-12-07 17:56:23 -08:00
David Greenspan
c87b00f0c9 jsparse: fix decimal literals starting with '.' 2012-12-07 13:40:23 -08:00
David Greenspan
99b659a810 jsparse: line numbers in error messages 2012-11-26 18:28:07 -08:00
David Greenspan
e8826efb1e jsparse: allow trailing comma in obj lit per ES5
(we should probably catch this in future linter)
2012-11-26 12:14:51 -08:00
David Greenspan
ae492fc793 jsparse: support ES5 line continuations 2012-11-22 16:54:07 -08:00
David Greenspan
44b4c9ed61 jsparse: allow keywords as property names per ES5 2012-11-22 16:54:07 -08:00
David Greenspan
ad7098307d Fix jsparse hex literals
(so 0xabc doesn't parse 0 and then error)
2012-11-21 20:50:48 -08:00
David Greenspan
afff7677b5 fix jsparse comments in AST 2012-10-01 12:28:09 -07:00
David Greenspan
6686d40526 include comments in jsparse AST 2012-09-30 00:42:04 -07:00
David Glasser
4dcdeb4435 Fix jsparse tests on IE7. 2012-09-28 12:39:03 -07:00
David Glasser
8ff16d3b04 IE7 throws an error if you use unquoted false or true as a key in object literals.
Quoting it works (and x[false] and x[true] work).
2012-09-28 11:42:57 -07:00
David Greenspan
b112cf8f92 small jsparse improvements 2012-09-20 21:22:34 -07:00
David Greenspan
a4c4fabbbd make jsparse internal 2012-09-19 11:42:34 -07:00
David Greenspan
90e516d7c9 make methods out of lexeme.next()/prev() 2012-09-12 16:59:24 -07:00
David Greenspan
c3477ec91c Make use of Parsers.lazy 2012-09-12 16:34:41 -07:00
David Greenspan
128392ccea real Parser for unstringify, Parsers.lazy 2012-09-12 16:26:10 -07:00
David Greenspan
7c3815fa27 parseRequired 2012-09-12 15:41:52 -07:00
David Greenspan
4ee4e2451c ParseNode.stringify and unstringify 2012-09-12 15:15:05 -07:00
David Greenspan
f9dba29b2d namespace parsers 2012-09-12 14:54:58 -07:00
David Greenspan
f9cfe9701f JSLexer, reduce namespace pollution 2012-09-12 14:48:32 -07:00
David Greenspan
25b564014a remove comment 2012-09-12 14:39:28 -07:00
David Greenspan
76cac26100 finish removing unnecessary seqs in node(…) 2012-09-12 14:34:50 -07:00
David Greenspan
39056590d4 move token matchers out of parser lib 2012-09-12 14:31:47 -07:00
David Greenspan
34b4ebbf22 create JSParser 2012-09-12 14:11:28 -07:00
David Greenspan
603ad14570 tweaks 2012-09-12 13:55:36 -07:00
David Greenspan
ce2a41c1c3 kill node.lhs, put error msg in Tokenizer 2012-09-12 13:42:54 -07:00
David Greenspan
3197dd241c prev/next pointers in Lexemes 2012-09-12 13:11:54 -07:00
David Greenspan
6e5e7497f0 Lexeme object 2012-09-12 13:04:19 -07:00
David Greenspan
ef3e4f41b8 more clarity around noIn flags 2012-09-12 11:09:30 -07:00
David Greenspan
d2c99c490a start of removing seq args to node(..) 2012-09-11 21:54:10 -07:00
David Greenspan
79ce16bfe9 kill second arg to opt(parser) 2012-09-11 21:51:06 -07:00
David Greenspan
9d55f11b69 move unary parsing into lib 2012-09-11 21:30:36 -07:00
David Greenspan
98859f6874 more refinements 2012-09-11 21:20:36 -07:00
David Greenspan
c44592d074 and/not, more refinements 2012-09-11 21:01:37 -07:00
David Greenspan
b34ed9eb6e reduce use of revalue(...) 2012-09-11 20:29:34 -07:00
David Greenspan
2b41592236 no more unpack! 2012-09-11 19:59:52 -07:00
David Greenspan
132b4897af Parser object 2012-09-11 19:38:27 -07:00
David Greenspan
a6bd5747b2 ParseNode object 2012-09-11 18:03:29 -07:00
David Greenspan
027f41e8c6 fix /= operator 2012-09-11 16:49:48 -07:00
David Greenspan
1043248092 finished syntax forms tests 2012-09-11 16:49:48 -07:00
David Greenspan
940955a71d fix typo 2012-09-11 16:49:48 -07:00
David Greenspan
9f2b4eb036 more tests 2012-09-11 16:49:48 -07:00
David Greenspan
c27a6b34ec more tests 2012-09-11 16:49:48 -07:00
David Greenspan
c859dad1a4 more tests 2012-09-11 16:49:48 -07:00
David Greenspan
b2345a5329 start of syntax forms test 2012-09-11 16:49:48 -07:00
David Greenspan
faac13b290 implement badParse in tester 2012-09-11 16:49:48 -07:00
David Greenspan
23f6e753af kill prevToken argument to runRequired 2012-09-11 16:49:48 -07:00
David Greenspan
447fef8f0e remove "after" arg to parseError 2012-09-11 16:49:47 -07:00