// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Config.h" #include "IShaderParser.h" #if COMPILE_WITH_SHADER_COMPILER namespace ShaderProcessing { /// /// Interface for objects that can read shader source code tokens /// class ITokenReader { public: /// /// Virtual destructor /// virtual ~ITokenReader() { } public: /// /// Checks if given token can be processed by this reader /// /// Starting token to check /// True if given token is valid starting token, otherwise false virtual bool CheckStartToken(const Token& token) = 0; /// /// Start processing source after reading start token /// /// Parser object /// Source code reader virtual void Process(IShaderParser* parser, Reader& text) = 0; }; } #endif