mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:34:42 +01:00
Add a Field node for fields in a class. (#3332)
This replaces the use of `VarStorage` in this case. Add an `UnboundFieldType` type as the type of a field, in cases where it's referenced without an accompanying object. Add a `BindName` node to describe the name binding performed for both variables and fields so that we can handle them more uniformly.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#include "toolchain/check/context.h"
|
||||
|
||||
namespace Carbon::Check {
|
||||
|
||||
auto HandleFileStart(Context& /*context*/, Parse::Node /*parse_node*/) -> bool {
|
||||
// No action to perform.
|
||||
// TODO: We may want to push `FileStart` as a sentinel so that `Peek`s can't
|
||||
// fail.
|
||||
return true;
|
||||
}
|
||||
|
||||
auto HandleFileEnd(Context& /*context*/, Parse::Node /*parse_node*/) -> bool {
|
||||
// No action to perform.
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Carbon::Check
|
||||
Reference in New Issue
Block a user