CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::HLSLScanner Class Reference

#include <CeresEngine/Material/ShaderCompiler/Frontend/HLSL/HLSLScanner.hpp>

Inheritance diagram for CeresEngine::ShaderCompiler::HLSLScanner:
CeresEngine::ShaderCompiler::SLScanner CeresEngine::ShaderCompiler::Scanner

Public Member Functions

 HLSLScanner (bool enableCgKeywords, Log *log=nullptr)
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::SLScanner
 SLScanner (Log *log=nullptr)
 
TokenPtr next () override
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::Scanner
 Scanner (Log *log=nullptr)
 
virtual ~Scanner ()=default
 
bool scanSource (const SourceCodePtr &source)
 
void pushTokenString (const TokenPtrString &tokenString)
 
void popTokenString ()
 
TokenPtrString::ConstIterator getTopTokenStringIterator () const
 
TokenPtr getActiveToken () const
 
TokenPtr getPreviousToken () const
 
const SourcePositiongetPosition () const
 
SourceCodegetSource () const
 
const SourceCodePtrgetSharedSource () const
 
const StringgetComment () const
 

Private Member Functions

TokenPtr scanIdentifierOrKeyword (String &&spell) override
 

Private Attributes

bool mEnableCgKeywords = false
 

Additional Inherited Members

- Protected Types inherited from CeresEngine::ShaderCompiler::Scanner
using Tokens = Token::Types
 
- Protected Member Functions inherited from CeresEngine::ShaderCompiler::Scanner
TokenPtr nextToken (bool scanComments, bool scanWhiteSpaces)
 
void storeStartPos ()
 
char take (char chr)
 
char takeIt ()
 
TokenPtr make (const Token::Types &type, bool takeChr=false)
 
TokenPtr make (const Token::Types &type, String &spell, bool takeChr=false)
 
TokenPtr make (const Token::Types &type, String &spell, const SourcePosition &pos, bool takeChr=false)
 
void error (const String &msg)
 
void errorUnexpected ()
 
void errorUnexpected (char expectedChar)
 
void errorUnexpectedEos ()
 
void ignore (const UniqueFunction< bool(char) const > &pred)
 
void ignoreWhiteSpaces (bool includeNewLines=true)
 
TokenPtr scanWhiteSpaces (bool includeNewLines=true)
 
TokenPtr scanCommentLine (bool scanComments)
 
TokenPtr scanCommentBlock (bool scanComments)
 
TokenPtr scanStringLiteral ()
 
TokenPtr scanCharLiteral ()
 
TokenPtr scanNumber (bool startWithPeriod=false)
 
TokenPtr scanNumberOrDot ()
 
TokenPtr scanVarArg (String &spell)
 
bool scanDigitSequence (String &spell)
 
bool isNewLine () const
 
bool is (const char chr) const
 
char chr () const
 
unsigned char uChr () const
 

Constructor & Destructor Documentation

◆ HLSLScanner()

CeresEngine::ShaderCompiler::HLSLScanner::HLSLScanner ( bool  enableCgKeywords,
Log log = nullptr 
)

Member Function Documentation

◆ scanIdentifierOrKeyword()

TokenPtr CeresEngine::ShaderCompiler::HLSLScanner::scanIdentifierOrKeyword ( String &&  spell)
overrideprivatevirtual

Member Data Documentation

◆ mEnableCgKeywords

bool CeresEngine::ShaderCompiler::HLSLScanner::mEnableCgKeywords = false
private

The documentation for this class was generated from the following file: