Handle identifier value category properly. (#986)

This commit is contained in:
Geoff Romer authored and GitHub committed 2021-12-15 13:27:36 -08:00
1 parent daf8729a75
commit c89ce1d570
9 files changed
+99 -48

No files matched your search

+3
View File
@@ -13,6 +13,7 @@
#include "executable_semantics/ast/pattern.h"
#include "executable_semantics/ast/source_location.h"
#include "executable_semantics/ast/static_scope.h"
#include "executable_semantics/ast/value_category.h"
#include "executable_semantics/common/arena.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Compiler.h"
@@ -344,6 +345,8 @@ class Continuation : public Statement {
// and after typechecking it's guaranteed to be true.
auto has_static_type() const -> bool { return static_type_.has_value(); }
auto value_category() const -> ValueCategory { return ValueCategory::Var; }
private:
std::string continuation_variable_;
Nonnull<Block*> body_;