Shader: Fill SourceLocation info to AST when parsing

This commit is contained in:
SirLynix
2022-03-28 18:24:51 +02:00
committed by Jérôme Leclercq
parent 8429411755
commit 78f4751967
10 changed files with 339 additions and 173 deletions

View File

@@ -9,6 +9,7 @@
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Shader/Config.hpp>
#include <Nazara/Shader/ShaderLangSourceLocation.hpp>
#include <memory>
#include <stdexcept>
#include <string>
@@ -26,10 +27,8 @@ namespace Nz::ShaderLang
struct Token
{
unsigned int column;
unsigned int line;
SourceLocation location;
TokenType type;
std::shared_ptr<const std::string> file;
std::variant<double, long long, std::string> data;
};