Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[v6] Start a stopgap test harness
  • Loading branch information
sorear committed Jan 4, 2011
1 parent 25fdee0 commit e941d29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v6/Begin.pm6
Expand Up @@ -95,7 +95,7 @@ augment class Sig::Parameter { method begin() { #OK exist
} }

augment class Op {
method begin() { for @$.zyg { $_.begin } }
method begin() { for self.zyg { $_.begin } }
}

augment class Op::YouAreHere { #OK exist
Expand Down Expand Up @@ -153,7 +153,7 @@ augment class Op::Lexical { #OK exist

augment class Op::CallMethod { #OK exist
method begin() {
for @$.zyg { $_.begin } # XXX callsame
for self.zyg { $_.begin } # XXX callsame
if $.private {
if $.ppath {
$.pclass = $*unit.get_item(@*opensubs[*-1].find_pkg($.ppath));
Expand Down Expand Up @@ -320,7 +320,7 @@ augment class Op::WhateverCode { #OK exist
augment class Op::Start { #OK exist
method begin() {
@*opensubs[*-1].add_state_name(Str, $.condvar);
for @$.zyg { $_.begin } # XXX callsame
for self.zyg { $_.begin } # XXX callsame
}
}

Expand Down
17 changes: 17 additions & 0 deletions v6/harness
@@ -0,0 +1,17 @@
use Metamodel;
use Op;
use Body;
use Unit;
use Begin;
use JSYNC;

my $ast = Unit.new(
name => "MAIN",
mainline => Body.new(
do => ::Op::CgOp.new(optree => ['prog', ['say', ['str', 'Hello, world']], ['null', 'var']]),
returnable => False));

my %*units;
my $mm = $ast.begin;

say to-jsync($mm);

0 comments on commit e941d29

Please sign in to comment.