toke.c, scan_ident(): use PEEKSPACE() to skip over whitespace.
authorBrian Fraser <fraserbn@gmail.com>
Sun, 1 Sep 2013 23:41:26 +0000 (20:41 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 18 Sep 2013 08:24:43 +0000 (05:24 -0300)
commita49b10d0a8dde2a4adb5a0a90e7b846b243e2514
tree9241721084fe56150fe16b17c7ed2b063bc9d784
parentb5248d1e210c2a723adae8e9b7f5d17076647431
toke.c, scan_ident(): use PEEKSPACE() to skip over whitespace.

This fixes a number of bugs regarding whitespace and line numbers
in scan_ident(), such as ${\nfoo\n} not increasing the line number,
or ${\ntime\n[1]} not working.

It goes through a number of hoops to get the correct line number for
warnings emmitted from scan_ident, and reverts CopLINE to its
original value if scan_ident() is giving up and returning from the
point of the opening bracket, like in the case of ${\n\nfoo()}.
t/lib/warnings/toke
t/op/eval.t
t/op/warn.t
toke.c