Files
FESADev/include/fesa/core/source_identity.h
T

30 lines
698 B
C++

#ifndef FESA_CORE_SOURCE_IDENTITY_H_
#define FESA_CORE_SOURCE_IDENTITY_H_
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <string>
namespace fesa {
/// @brief Identifies a semantic entity by its stable collection position.
using EntityIndex = std::uint32_t;
/// @brief Identifies the input location that produced an item or diagnostic.
struct SourceLocation {
std::filesystem::path file;
std::size_t line;
};
/// @brief Preserves semantic and raw-text forms of a source entity identity.
struct SourceEntityId {
std::string instance_name;
std::int64_t source_label;
std::string source_label_text;
};
} // namespace fesa
#endif // FESA_CORE_SOURCE_IDENTITY_H_