Permalink
Browse files

Perlito5 - parser - TODO cleanup: deref inside double quotes

  • Loading branch information...
1 parent efdbc04 commit 70581f07756bfa74a763274ed0f7319b19584700 @fglock committed Nov 14, 2012
Showing with 10 additions and 9 deletions.
  1. +0 −8 TODO-perlito5
  2. +10 −1 t5/01-perlito/04-string.t
View
@@ -61,14 +61,6 @@ TODO list for Perlito5
--- check signature in sort()
--- fix the prototype for 'stat(*)' (see t/test.pl in the perl test suite)
--- deref inside double quotes:
- $ node perlito5.js -Bjs -e ' my $x = "123"; my $y = \$x; print "[$$y]\n" '
- [$[object Object]]
-
- $ node perlito5.js -MO=Deparse -e ' " $v->{x} $$v{x} " '
- (' ' . $v . '->{x} $' . $v{'x'} . ' ');
-
-
-- add "print", "printf", "say" special parsing - note this is related to indirect object notation
-- indirect object notation
http://lwn.net/Articles/451486/
@@ -2,7 +2,7 @@ use v5;
use strict;
use feature 'say';
-say '1..18';
+say '1..19';
my $x = "abcd";
if (substr($x,1,1) ne "b") {
@@ -99,4 +99,13 @@ print 'not ' if $r ne '-890-'; say "ok 18 - array deref interpolation - $r";
# print 'not ' if $r ne '-890-'; say 'ok 18 - array deref interpolation';
# }
+$r = "-$$v[2]-";
+print 'not ' if $r ne '-890-'; say "ok 18 - array deref interpolation - $r";
+
+{
+ my $x = "123";
+ my $y = \$x;
+ $r = "[$$y]";
+ print 'not ' if $r ne '[123]'; say "ok 19 - scalar deref interpolation - $r";
+}

0 comments on commit 70581f0

Please sign in to comment.