38 lines
763 B
C++
38 lines
763 B
C++
#pragma once
|
|
|
|
#include "fesa/core/source_identity.hpp"
|
|
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace fesa {
|
|
|
|
// Names are canonicalized for syntax lookup while values remain source text.
|
|
struct KeywordParameter {
|
|
std::string name;
|
|
std::optional<std::string> value;
|
|
};
|
|
|
|
struct DataLine {
|
|
std::vector<std::string> fields;
|
|
SourceLocation location;
|
|
};
|
|
|
|
struct KeywordBlock {
|
|
std::string canonicalName;
|
|
std::string originalLine;
|
|
std::vector<KeywordParameter> parameters;
|
|
std::vector<DataLine> data;
|
|
SourceLocation location;
|
|
};
|
|
|
|
struct ParsedInput {
|
|
std::filesystem::path sourcePath;
|
|
std::string sourceContentIdentity;
|
|
std::vector<KeywordBlock> blocks;
|
|
};
|
|
|
|
} // namespace fesa
|