CeresEngine
0.2.0
A game development framework
Loading...
Searching...
No Matches
EndOfScopeAnalyzer.hpp
Go to the documentation of this file.
1
//
2
// CeresEngine - A game development framework
3
//
4
// Created by Rogiel Sulzbach.
5
// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6
//
7
8
#pragma once
9
10
#include "
Visitor.hpp
"
11
12
#include "
CeresEngine/Material/ShaderCompiler/SymbolTable.hpp
"
13
14
#include "
CeresEngine/Material/ShaderCompiler/AST/Token.hpp
"
15
16
namespace
CeresEngine::ShaderCompiler
{
17
21
class
EndOfScopeAnalyzer
:
private
Visitor
{
22
public
:
23
void
markEndOfScopesFromFunction
(
const
FunctionDeclaration
&
funcDeclaration
);
24
25
private
:
// Visitor implementation
26
DECLARATION_VISIT_PROC
(
CodeBlock
);
27
28
DECLARATION_VISIT_PROC
(
ForLoopStatement
);
29
DECLARATION_VISIT_PROC
(
WhileLoopStatement
);
30
DECLARATION_VISIT_PROC
(
DoWhileLoopStatement
);
31
DECLARATION_VISIT_PROC
(
IfStatement
);
32
DECLARATION_VISIT_PROC
(
SwitchStatement
);
33
DECLARATION_VISIT_PROC
(
ExpressionStatement
);
34
DECLARATION_VISIT_PROC
(
ReturnStatement
);
35
DECLARATION_VISIT_PROC
(
CtrlTransferStatement
);
36
};
37
38
}
// namespace CeresEngine::ShaderCompiler
SymbolTable.hpp
Token.hpp
Visitor.hpp
DECLARATION_VISIT_PROC
#define DECLARATION_VISIT_PROC(CLASS_NAME)
Definition
Visitor.hpp:88
CeresEngine::ShaderCompiler::EndOfScopeAnalyzer
End-of-scope analyzer.
Definition
EndOfScopeAnalyzer.hpp:21
CeresEngine::ShaderCompiler::EndOfScopeAnalyzer::markEndOfScopesFromFunction
void markEndOfScopesFromFunction(const FunctionDeclaration &funcDeclaration)
CeresEngine::ShaderCompiler::Visitor
Definition
Visitor.hpp:92
CeresEngine::ShaderCompiler
Definition
AST.hpp:33
CeresEngine::hash
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition
Hash.hpp:25
CeresEngine::ShaderCompiler::CodeBlock
Definition
AST.hpp:388
CeresEngine::ShaderCompiler::CtrlTransferStatement
Definition
AST.hpp:1049
CeresEngine::ShaderCompiler::DoWhileLoopStatement
Definition
AST.hpp:998
CeresEngine::ShaderCompiler::ExpressionStatement
Definition
AST.hpp:1030
CeresEngine::ShaderCompiler::ForLoopStatement
Definition
AST.hpp:980
CeresEngine::ShaderCompiler::FunctionDeclaration
Definition
AST.hpp:745
CeresEngine::ShaderCompiler::IfStatement
Definition
AST.hpp:1006
CeresEngine::ShaderCompiler::ReturnStatement
Definition
AST.hpp:1037
CeresEngine::ShaderCompiler::SwitchStatement
Definition
AST.hpp:1022
CeresEngine::ShaderCompiler::WhileLoopStatement
Definition
AST.hpp:990
Sources
CeresEngine
Material
ShaderCompiler
AST
Visitor
EndOfScopeAnalyzer.hpp
Generated by
1.9.8