Permalink
Browse files

Perlito5 - parser - fix package autovivification; 3 more lex.t tests …

…pass
  • Loading branch information...
1 parent 5879509 commit 0bc2e7a3b03e655b81cb0174032a27654ea3d115 @fglock committed Nov 28, 2012
Showing with 22 additions and 19 deletions.
  1. +1 −0 html/perlito5.js
  2. +2 −2 perlito5.pl
  3. +1 −0 src5/lib/Perlito5/Javascript2/Runtime.pm
  4. +1 −0 src5/lib/Perlito5/Javascript3/Runtime.pm
  5. +17 −17 t5/base/lex.t
View
@@ -253,6 +253,7 @@ p5make_package("Perlito5::Runtime");
p5make_package("Perlito5::Grammar");
function p5make_sub(pkg_name, sub_name, func) {
+ p5make_package(pkg_name);
p5pkg[pkg_name][sub_name] = func;
}
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -259,6 +259,7 @@ p5make_package("Perlito5::Runtime");
p5make_package("Perlito5::Grammar");
function p5make_sub(pkg_name, sub_name, func) {
+ p5make_package(pkg_name);
p5pkg[pkg_name][sub_name] = func;
}
@@ -272,6 +272,7 @@ p5make_package("Perlito5::Runtime");
p5make_package("Perlito5::Grammar");
function p5make_sub(pkg_name, sub_name, func) {
+ p5make_package(pkg_name);
p5pkg[pkg_name][sub_name] = func;
}
View
@@ -1,7 +1,7 @@
#!./perl
#print "1..57\n";
-print "1..43\n";
+print "1..46\n";
$x = 'x';
@@ -249,21 +249,21 @@ print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n");
## ++$test;
}
##
-## # Tests 52-54
-## # => should only quote foo::bar if it isn't a real sub. AMS, 20010621
-##
-## sub xyz::foo { "bar" }
-## my %str = (
-## foo => 1,
-## xyz::foo => 1,
-## xyz::bar => 1,
-## );
-##
-## my $test = 52;
-## print ((exists $str{foo} ? "" : "not ")."ok $test\n"); ++$test;
-## print ((exists $str{bar} ? "" : "not ")."ok $test\n"); ++$test;
-## print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test;
-##
+ # Tests 52-54
+ # => should only quote foo::bar if it isn't a real sub. AMS, 20010621
+
+ sub xyz::foo { "bar" }
+ my %str = (
+ foo => 1,
+ xyz::foo => 1,
+ xyz::bar => 1,
+ );
+
+ my $test = 43;
+ print ((exists $str{foo} ? "" : "not ")."ok $test\n"); ++$test;
+ print ((exists $str{bar} ? "" : "not ")."ok $test\n"); ++$test;
+ print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test;
+
## sub foo::::::bar { print "ok $test\n"; $test++ }
## foo::::::bar;
##
@@ -274,4 +274,4 @@ print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n");
# Is "[~" scanned correctly?
@a = (1,2,3);
print "not " unless($a[~~2] == 3);
-print "ok 43\n";
+print "ok 46\n";

0 comments on commit 0bc2e7a

Please sign in to comment.