Skip to content

Commit

Permalink
a few simple pir:: to nqp:: changes, and remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 22, 2011
1 parent 5a7d782 commit 1572977
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/HLL/Compiler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class HLL::Compiler {
}

my sub value_type($value) {
pir::isa($value, 'NameSpace')
pir::isa($value, 'NameSpace')
?? 'namespace'
!! (pir::isa($value, 'Sub') ?? 'sub' !! 'var')
}
Expand Down Expand Up @@ -139,7 +139,7 @@ class HLL::Compiler {
}

method autoprint($value) {
pir::say(~$value)
nqp::say(~$value)
unless (pir::getinterp__P()).stdout_handle().tell() > $*AUTOPRINTPOS;
}

Expand All @@ -163,7 +163,7 @@ class HLL::Compiler {

last if pir::isnull($code);
unless pir::defined($code) {
pir::print("\n");
nqp::print("\n");
last;
}

Expand All @@ -178,7 +178,7 @@ class HLL::Compiler {
{
$output := self.eval($code, :outer_ctx($save_ctx), |%adverbs);
CATCH {
pir::print(~$! ~ "\n");
nqp::print(~$! ~ "\n");
next;
}
};
Expand All @@ -195,7 +195,7 @@ class HLL::Compiler {
if !$target {
self.autoprint($output);
} elsif $target eq 'pir' {
pir::say($output);
nqp::say($output);
} else {
self.dumper($output, $target, |%adverbs);
}
Expand Down Expand Up @@ -420,7 +420,7 @@ class HLL::Compiler {
try {
$res := $p.parse(@args);
CATCH {
pir::say($_);
nqp::say($_);
self.usage;
pir::exit(1);
}
Expand Down Expand Up @@ -575,24 +575,24 @@ class HLL::Compiler {
if $name {
say($name);
}
pir::say($!usage);
nqp::say($!usage);
pir::exit__vi(0);
}

method version() {
my $version := %!config<version>;
my $parver := %parrot_config<VERSION>;
my $parrev := %parrot_config<git_describe> // '(unknown)';
pir::say("This is $!language version $version built on parrot $parver revision $parrev");
nqp::say("This is $!language version $version built on parrot $parver revision $parrev");
pir::exit__vi(0);
}

method show-config() {
for %parrot_config {
pir::say('parrot::' ~ $_.key ~ '=' ~ $_.value);
nqp::say('parrot::' ~ $_.key ~ '=' ~ $_.value);
}
for %!config {
pir::say($!language ~ '::' ~ $_.key ~ '=' ~ $_.value);
nqp::say($!language ~ '::' ~ $_.key ~ '=' ~ $_.value);
}
pir::exit__vi(0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/IO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sub spew($filename, $contents) {

sub print(*@args) {
for @args {
pir::print($_);
nqp::print($_);
}
1;
}
Expand Down

0 comments on commit 1572977

Please sign in to comment.