Several shader preprocessor parser fixes and improvements

This commit is contained in:
bitsawer 2023-01-25 18:18:26 +02:00
parent cc7aa72f01
commit 6f5598979f
3 changed files with 114 additions and 35 deletions

View file

@ -622,7 +622,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
char_idx += 2;
include_positions.resize(include_positions.size() - 1); // Pop back.
tk_line = include_positions[include_positions.size() - 1].line; // Restore line.
tk_line = include_positions[include_positions.size() - 1].line - 1; // Restore line.
} else {
return _make_token(TK_ERROR, "Invalid include enter/exit hint token (@@> and @@<)");