REPL: fix floating point number parsing
authorNirk Niggler <nirk.niggler@gmail.com>
Thu, 3 Jan 2013 14:27:55 +0000 (09:27 -0500)
committerNathan Rajlich <nathan@tootallnate.net>
Fri, 4 Jan 2013 01:11:54 +0000 (17:11 -0800)
commit0459a230631f6ff44f63d46396c474c13e6c232c
tree2b324c008ce0f943a009f959a5d779793d2f8fa6
parenta6167742811a69d98a716de8f0defa5e50af17d9
REPL: fix floating point number parsing

In JS, the expression ".1" is a floating point number.  Issue 4268 concerns the
REPL interpreting floating point numbers that lead with a "." as keywords.  The
original bugfix worked for this specific case but not for the general case:

    var x = [
        .1,
        .2,
        .3
    ];

The attached change and test (`.1+.1` should be `.2`) fix the bug.

Closes #4513.
lib/repl.js
test/simple/test-repl.js