mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 17:52:58 +01:00
Store named constant values in the AST (#1011)
This enables us to stop using `Env` in the typechecker. As a byproduct, this commit also restructures the interpreter to handle run-time global initialization as part of ordinary execution, using the Action stack.
This commit is contained in:
@@ -55,6 +55,9 @@ void Action::Print(llvm::raw_ostream& out) const {
|
||||
case Action::Kind::StatementAction:
|
||||
cast<StatementAction>(*this).statement().PrintDepth(1, out);
|
||||
break;
|
||||
case Action::Kind::DeclarationAction:
|
||||
cast<DeclarationAction>(*this).declaration().Print(out);
|
||||
break;
|
||||
case Action::Kind::ScopeAction:
|
||||
out << "ScopeAction";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user