Skip to content

Commit

Permalink
Fix deparsing/.raku on VarDeclaration::Constant
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 5, 2023
1 parent ae4ce14 commit 6489eb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Raku/ast/variable-declaration.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ class RakuAST::VarDeclaration::Constant
{
has str $.name;
has RakuAST::Initializer $.initializer;
has Mu $!value;
has RakuAST::Type $.type;
has Mu $!value;
has Mu $!package;
has RakuAST::ExpressionThunk $!thunk;

Expand Down
2 changes: 1 addition & 1 deletion src/core.c/RakuAST/Deparse.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,7 @@ class RakuAST::Deparse {
@parts.push(self.deparse($_)) for @traits;
}
@parts.push('=');
@parts.push($ast.value.raku);
@parts.push(self.deparse($ast.initializer));

@parts.join(' ');
}
Expand Down
2 changes: 1 addition & 1 deletion src/core.c/RakuAST/Raku.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ augment class RakuAST::Node {
}

multi method raku(RakuAST::VarDeclaration::Constant:D: --> Str:D) {
self!nameds: <scope type name traits value>
self!nameds: <scope type name traits initializer>
}

multi method raku(RakuAST::VarDeclaration::Implicit:D: --> Str:D) {
Expand Down

0 comments on commit 6489eb8

Please sign in to comment.