handle_base.cpp 615 B

123456789101112131415161718
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "toolchain/parse/context.h"
  5. namespace Carbon::Parse {
  6. // Handles processing of a complete `base: B` declaration.
  7. auto HandleBaseDecl(Context& context) -> void {
  8. auto state = context.PopState();
  9. context.AddNodeExpectingDeclSemi(state, NodeKind::BaseDecl,
  10. Lex::TokenKind::Base,
  11. /*is_def_allowed=*/false);
  12. }
  13. } // namespace Carbon::Parse