mfontani/JavaScript-HashRef-Decode — pull request #2 by arc (2013-01-23 18:31:48+00:00)
Title: More string and number syntaxes

Hi, Marco. This PR adds support for the following:

* All backslash sequences in string literals
* The exponent notation for decimal literals
* Hexadecimal literals

(All subject to my reading of http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf, that is.)

It also makes string literal parsing faster, by unrolling the inner backslashed-or-plain loop in the regex. The way I've done that requires Perl 5.10, which I don't mind, but you might. If you do mind it, you can skip that commit, or alternatively it should be possible (if somewhat annoyingly verbose) to rewrite it to use `(?>)` instead of possessive quantifiers. I'm happy to do either of those if you want.

Share and enjoy. :-)