Skip to content

Commit

Permalink
Don't call attach for non-RakuAST nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 5, 2023
1 parent bb4dd9c commit 009b1d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Raku/Actions.nqp
Expand Up @@ -2079,32 +2079,32 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
}

method decint($/) {
self.attach: $/, $*LITERALS.intern-int: ~$/, 10, -> {
make $*LITERALS.intern-int: ~$/, 10, -> {
$/.panic("'$/' is not a valid number")
}
}

method hexint($/) {
self.attach: $/, $*LITERALS.intern-int: ~$/, 16, -> {
make $*LITERALS.intern-int: ~$/, 16, -> {
$/.panic("'$/' is not a valid number")
}
}

method octint($/) {
self.attach: $/, $*LITERALS.intern-int: ~$/, 8, -> {
make $*LITERALS.intern-int: ~$/, 8, -> {
$/.panic("'$/' is not a valid number")
}
}

method binint($/) {
self.attach: $/, $*LITERALS.intern-int: ~$/, 2, -> {
make $*LITERALS.intern-int: ~$/, 2, -> {
$/.panic("'$/' is not a valid number")
}
}

method signed-integer($/) {
my $integer := $<integer>.ast;
self.attach: $/, $<sign> eq '-' || $<sign> eq ''
make $<sign> eq '-' || $<sign> eq ''
?? nqp::neg_I($integer, $integer.WHAT)
!! $integer;
}
Expand Down

0 comments on commit 009b1d0

Please sign in to comment.