Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make ints_to_string a method, so that it can be overridden in subclasses
  • Loading branch information
moritz committed Nov 11, 2011
1 parent 05d6ab2 commit 9647ef9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HLL/Actions.pm
Expand Up @@ -6,7 +6,7 @@ class HLL::Actions {
nqp::atkey($res, 0);
}

our sub ints_to_string($ints) {
method ints_to_string($ints) {
if pir::does($ints, 'array') {
my $result := '';
for $ints {
Expand Down Expand Up @@ -144,11 +144,11 @@ class HLL::Actions {
method quote_escape:sym<esc>($/) { make "\c[27]"; }

method quote_escape:sym<hex>($/) {
make ints_to_string( $<hexint> ?? $<hexint> !! $<hexints><hexint> );
make self.ints_to_string( $<hexint> ?? $<hexint> !! $<hexints><hexint> );
}

method quote_escape:sym<oct>($/) {
make ints_to_string( $<octint> ?? $<octint> !! $<octints><octint> );
make self.ints_to_string( $<octint> ?? $<octint> !! $<octints><octint> );
}

method quote_escape:sym<chr>($/) {
Expand Down

0 comments on commit 9647ef9

Please sign in to comment.