aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilerscanfunctions_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-03-26 21:32:05 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:17:13 +0000
commite9492e7b7b44c1f8cd5489d93463fc2b1f8b6d72 (patch)
tree01d8e52fe7841c91fd019219055796fcc8db22aa /src/qml/compiler/qv4compilerscanfunctions_p.h
parent17f72f2d07352940b67a60c2ff6f7ef848793488 (diff)
Rename the CompilationMode enum to ContextType
And make it an enum class. The new name fits better, as it's mainly used to determine the type of the context when parsing. Also already added the 'Block' value that will be needed. Change-Id: I70d963b6a0b22db1a3c607cce6bdd2054b29e000 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions_p.h')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h
index 5ec9310b8d..fc24481ad4 100644
--- a/src/qml/compiler/qv4compilerscanfunctions_p.h
+++ b/src/qml/compiler/qv4compilerscanfunctions_p.h
@@ -81,11 +81,11 @@ class ScanFunctions: protected QQmlJS::AST::Visitor
{
typedef QV4::TemporaryAssignment<bool> TemporaryBoolAssignment;
public:
- ScanFunctions(Codegen *cg, const QString &sourceCode, CompilationMode defaultProgramMode);
+ ScanFunctions(Codegen *cg, const QString &sourceCode, ContextType defaultProgramType);
void operator()(AST::Node *node);
- void enterGlobalEnvironment(CompilationMode compilationMode);
- void enterEnvironment(AST::Node *node, CompilationMode compilationMode);
+ void enterGlobalEnvironment(ContextType compilationMode);
+ void enterEnvironment(AST::Node *node, ContextType compilationMode);
void leaveEnvironment();
void enterQmlFunction(AST::FunctionDeclaration *ast)
@@ -146,7 +146,7 @@ protected:
QStack<Context *> _contextStack;
bool _allowFuncDecls;
- CompilationMode defaultProgramMode;
+ ContextType defaultProgramType;
private:
static constexpr AST::Node *astNodeForGlobalEnvironment = nullptr;