Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make HLL::Compiler more aware of QAST.
  • Loading branch information
jnthn committed Jul 2, 2012
1 parent e5cccaa commit 2e6ad4a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/HLL/Compiler.pm
Expand Up @@ -453,12 +453,14 @@ class HLL::Compiler {
method past($source, *%adverbs) {
my $ast := $source.ast();
self.panic("Unable to obtain ast from " ~ pir::typeof($source))
unless $ast ~~ PAST::Node;
unless $ast ~~ PAST::Node || $ast ~~ QAST::Node;
$ast;
}

method post($source, *%adverbs) {
pir::compreg__Ps('PAST').to_post($source, |%adverbs)
$source ~~ PAST::Node ??
pir::compreg__Ps('PAST').to_post($source, |%adverbs) !!
QAST::Compiler.as_post($source)
}

method pirbegin() {
Expand Down

0 comments on commit 2e6ad4a

Please sign in to comment.