96 std::string_view string;
99 Grindstone::GraphicsAPI::GeometryType geometryType;
100 Grindstone::GraphicsAPI::PolygonFillMode polygonFillMode;
101 Grindstone::GraphicsAPI::CullMode cullMode;
102 Grindstone::GraphicsAPI::CompareOperation compareOperation;
103 Grindstone::GraphicsAPI::BlendOperation blendOperation;
104 Grindstone::GraphicsAPI::BlendFactor blendFactor;
105 Grindstone::GraphicsAPI::ShaderStage shaderStage;
106 BlendPreset blendPreset;
107 ParameterType parameterType;
109 Data() : boolean(
false) {}
110 Data(
bool boolean) : boolean(
boolean) {}
111 Data(
float number) : number(number) {}
112 Data(std::string_view
string) : string(
string) {}
113 Data(Grindstone::GraphicsAPI::CullMode cullMode) : cullMode(cullMode) {}
114 Data(Grindstone::GraphicsAPI::CompareOperation compareOperation) : compareOperation(compareOperation) {}
115 Data(Grindstone::GraphicsAPI::BlendOperation blendOperation) : blendOperation(blendOperation) {}
116 Data(Grindstone::GraphicsAPI::BlendFactor blendFactor) : blendFactor(blendFactor) {}
117 Data(Grindstone::GraphicsAPI::GeometryType geometryType) : geometryType(geometryType) {}
118 Data(Grindstone::GraphicsAPI::PolygonFillMode polygonFillMode) : polygonFillMode(polygonFillMode) {}
119 Data(Grindstone::GraphicsAPI::ShaderStage shaderStage) : shaderStage(shaderStage) {}
120 Data(BlendPreset blendPreset) : blendPreset(blendPreset) {}
121 Data(ParameterType parameterType) : parameterType(parameterType) {}
126 const std::filesystem::path& path;
130 TokenData(Token token,
const std::filesystem::path& path, uint32_t line, uint32_t column)
noexcept;
131 TokenData(Token token,
Data data,
const std::filesystem::path& path, uint32_t line, uint32_t column)
noexcept;
132 TokenData(
const TokenData& other)
noexcept;
133 TokenData(TokenData&& other)
noexcept;
135 static TokenData CommentMultiLine(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
136 static TokenData Comment(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
137 static TokenData Identifier(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
138 static TokenData String(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
139 static TokenData Boolean(
bool boolean,
const std::filesystem::path& path, uint32_t line, uint32_t column);
140 static TokenData Number(
float number,
const std::filesystem::path& path, uint32_t line, uint32_t column);
141 static TokenData ShaderGlsl(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
142 static TokenData ShaderHlsl(std::string_view
string,
const std::filesystem::path& path, uint32_t line, uint32_t column);
143 static TokenData GeometryTypeValue(Grindstone::GraphicsAPI::GeometryType mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
144 static TokenData FillModeValue(Grindstone::GraphicsAPI::PolygonFillMode mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
145 static TokenData CullModeValue(Grindstone::GraphicsAPI::CullMode mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
146 static TokenData CompareOperationValue(Grindstone::GraphicsAPI::CompareOperation mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
147 static TokenData BlendOperationValue(Grindstone::GraphicsAPI::BlendOperation mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
148 static TokenData BlendFactorValue(Grindstone::GraphicsAPI::BlendFactor mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
149 static TokenData ShaderStageValue(Grindstone::GraphicsAPI::ShaderStage mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
150 static TokenData BlendPresetValue(BlendPreset mode,
const std::filesystem::path& path, uint32_t line, uint32_t column);
151 static TokenData Parameter(ParameterType parameterType,
const std::filesystem::path& path, uint32_t line, uint32_t column);