diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-06-03 02:36:05 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-06-03 02:36:05 +0800 |
| commit | 2d6ab4b7f207a746a7caaa93466b410cbe328626 (patch) | |
| tree | 570a2d7776e616309149adf065acc474c0c0de98 /node/DeclNode.cc | |
| parent | cd1466f30c146e12faa0db7e1b53b508bf2274c6 (diff) | |
support for short, int64 and AST dump
Diffstat (limited to 'node/DeclNode.cc')
| -rw-r--r-- | node/DeclNode.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/DeclNode.cc b/node/DeclNode.cc index 4d2f8aa..d22c847 100644 --- a/node/DeclNode.cc +++ b/node/DeclNode.cc @@ -75,9 +75,9 @@ TypeDeclNode::TypeDeclNode(Context* context, VariableList* scope, , decls_(std::move(decls)) {} Value TypeDeclNode::CodeGen() { - scope_ = (scope_ == nullptr ? context_->GetGlobals() : scope_); + VariableList* scope = (scope_ == nullptr ? context_->GetGlobals() : scope_); for (auto&& decl : decls_) { - scope_->AddTypeAlias(std::get<0>(decl), std::get<1>(decl)->GetType()); + scope->AddTypeAlias(std::get<0>(decl), std::get<1>(decl)->GetType()); } return nullptr; } |
