Shader: Fixes some errors and add unit tests

This commit is contained in:
SirLynix
2022-04-02 16:07:13 +02:00
parent 1c7a3a96e5
commit aa43db956c
5 changed files with 49 additions and 17 deletions

View File

@@ -285,7 +285,7 @@ namespace Nz::ShaderLang
}
if (!moduleVersion.has_value())
throw ParserMissingAttributeError{ moduleToken.location };
throw ParserMissingAttributeError{ moduleToken.location, ShaderAst::AttributeType::LangVersion };
if (!moduleId)
moduleId = Uuid::Generate();