Files
carbon-lang/toolchain/check/handle_observe.cpp
T
Özgür d11ee4b2b1 Implement parsing observe declarations (#6674)
This implements parsing of the
[`observe`](https://docs.carbon-lang.dev/docs/design/generics/details.html#observing-a-type-implements-an-interface)
declarations.

- Added states and node kinds.
- Added node categories.
- Added a diagnostic for invalid keywords/operators.
- Implemented parser state handlers.
- Added structs to `typed_nodes.h`.
- Added parser tests.
2026-02-26 19:21:19 +00:00

30 lines
920 B
C++

// 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"
#include "toolchain/check/handle.h"
#include "toolchain/parse/node_ids.h"
namespace Carbon::Check {
auto HandleParseNode(Context& context, Parse::ObserveIntroducerId node_id)
-> bool {
return context.TODO(node_id, "ObserveIntroducerId");
}
auto HandleParseNode(Context& context, Parse::ObserveEqualEqualId node_id)
-> bool {
return context.TODO(node_id, "ObserveEqualEqualId");
}
auto HandleParseNode(Context& context, Parse::ObserveImplsId node_id) -> bool {
return context.TODO(node_id, "ObserveImplsId");
}
auto HandleParseNode(Context& context, Parse::ObserveDeclId node_id) -> bool {
return context.TODO(node_id, "ObserveDeclId");
}
} // namespace Carbon::Check