Skip to content

Commit

Permalink
Ununderscore complex_number
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jun 11, 2023
1 parent da5fb80 commit 885a86a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/Raku/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,8 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
elsif $<rational-number> {
self.attach: $/, $<rational-number>.ast;
}
elsif $<complex_number> {
self.attach: $/, $<complex_number>.ast;
elsif $<complex-number> {
self.attach: $/, $<complex-number>.ast;
}
elsif $<unum> {
my $code := nqp::ord($/.Str);
Expand Down Expand Up @@ -2212,11 +2212,11 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
);
}

method complex_number($/) {
self.attach: $/, $<bare_complex_number>.ast;
method complex-number($/) {
self.attach: $/, $<bare-complex-number>.ast;
}

method bare_complex_number($/) {
method bare-complex-number($/) {
self.attach: $/, self.r('ComplexLiteral').new(
$*LITERALS.intern-complex(~$<re>, ~$<im>)
);
Expand Down
6 changes: 3 additions & 3 deletions src/Raku/Grammar.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ grammar Raku::Grammar is HLL::Grammar does Raku::Common {
| <decimal-number>
| <radix-number>
| <rational-number>
| <complex_number>
| <complex-number>
| 'Inf' >>
| $<uinf>='∞'
| <unum=:No+:Nl>
Expand Down Expand Up @@ -2729,8 +2729,8 @@ grammar Raku::Grammar is HLL::Grammar does Raku::Common {
<nu=.signed-integer> '/' <de=integer>
}
token complex_number { '<' <bare_complex_number> '>' }
token bare_complex_number {
token complex-number { '<' <bare-complex-number> '>' }
token bare-complex-number {
<?before <.[-−+0..9<>:.eEboxdInfNa\\]>+? 'i'>
<re=.signed-number> <?[-−+]> <im=.signed-number> \\? 'i'
}
Expand Down

0 comments on commit 885a86a

Please sign in to comment.