summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h')
-rw-r--r--src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h b/src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h
index 2888e289ce..29c30a8239 100644
--- a/src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h
+++ b/src/3rdparty/angle/src/compiler/preprocessor/DirectiveParser.h
@@ -7,10 +7,9 @@
#ifndef COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_
#define COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_
-#include "Lexer.h"
-#include "Macro.h"
-#include "pp_utils.h"
-#include "SourceLocation.h"
+#include "compiler/preprocessor/Lexer.h"
+#include "compiler/preprocessor/Macro.h"
+#include "compiler/preprocessor/SourceLocation.h"
namespace pp
{
@@ -25,13 +24,13 @@ class DirectiveParser : public Lexer
DirectiveParser(Tokenizer *tokenizer,
MacroSet *macroSet,
Diagnostics *diagnostics,
- DirectiveHandler *directiveHandler);
+ DirectiveHandler *directiveHandler,
+ int maxMacroExpansionDepth);
+ ~DirectiveParser() override;
void lex(Token *token) override;
private:
- PP_DISALLOW_COPY_AND_ASSIGN(DirectiveParser);
-
void parseDirective(Token *token);
void parseDefine(Token *token);
void parseUndef(Token *token);
@@ -62,22 +61,21 @@ class DirectiveParser : public Lexer
bool foundElseGroup;
ConditionalBlock()
- : skipBlock(false),
- skipGroup(false),
- foundValidGroup(false),
- foundElseGroup(false)
+ : skipBlock(false), skipGroup(false), foundValidGroup(false), foundElseGroup(false)
{
}
};
bool mPastFirstStatement;
- bool mSeenNonPreprocessorToken; // Tracks if a non-preprocessor token has been seen yet. Some macros, such as
- // #extension must be declared before all shader code.
+ bool mSeenNonPreprocessorToken; // Tracks if a non-preprocessor token has been seen yet. Some
+ // macros, such as
+ // #extension must be declared before all shader code.
std::vector<ConditionalBlock> mConditionalStack;
Tokenizer *mTokenizer;
MacroSet *mMacroSet;
Diagnostics *mDiagnostics;
DirectiveHandler *mDirectiveHandler;
int mShaderVersion;
+ int mMaxMacroExpansionDepth;
};
} // namespace pp