Files
carbon-lang/explorer/ast/expression_category.h
T
Jon Ross-Perkins 7bcfe7df59 LLVM should be included using quotes. (#2952)
This also results in correct dependency discovery (the missing LLVM dep on expression_category).
2023-06-28 15:50:08 -07:00

28 lines
909 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
#ifndef CARBON_EXPLORER_AST_EXPRESSION_CATEGORY_H_
#define CARBON_EXPLORER_AST_EXPRESSION_CATEGORY_H_
#include "llvm/ADT/StringRef.h"
namespace Carbon {
// The category of a Carbon expression indicates whether it evaluates
// to a value, reference, or initialization.
enum class ExpressionCategory {
// A "value expression" produces a value (with no associated location).
Value,
// A "reference expression" produces a location of an existing value.
Reference,
// An "initializing expression" takes a location and initialize it.
Initializing,
};
auto ExpressionCategoryToString(ExpressionCategory cat) -> llvm::StringRef;
} // namespace Carbon
#endif // CARBON_EXPLORER_AST_EXPRESSION_CATEGORY_H_