/
githubmirror
/
carbon-lang
Обзор
Документация
Войти
/
githubmirror
/
carbon-lang
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
toolchain/parse/handle_namespace.cpp
25 строк
872 B
Chandler Carruth
Replace `:!` binding syntax with phase keywords and contextual defaults (#7479)
11 июл 2026, 04:22
Не верифицирован
11 июл 2026, 04:22
8be274c
Код
Авторство
О чём код?
// 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/parse/context.h" #include "toolchain/parse/handle.h" namespace Carbon::Parse { auto HandleNamespace(Context& context) -> void { auto state = context.PopState(); context.PushState(state, StateKind::NamespaceFinish); context.PushState(StateKind::DeclNameAndParams, state.token, BindingContext::CompileTimeEntityParam); } auto HandleNamespaceFinish(Context& context) -> void { auto state = context.PopState(); context.AddNodeExpectingDeclSemi(state, NodeKind::Namespace, Lex::TokenKind::Namespace, /*is_def_allowed=*/false); } } // namespace Carbon::Parse