Allow 'defined' in define in non-WebGL.

This is needed to pass dEQP conformance. Several of the harder dEQP
tests around this behaviour are excluded from the mustpass list. This
is presumably because the behaviours weren't implemented portably.
Nevertheless we need to support conformant behaviour for GLES 2.0
Contexts for the most simple uses.

This also leaves the error behaviour intact for WebGL specs.

Bug: angleproject:1335
Change-Id: Ia80b4f71475efa928488ee6c2ee35c566d4602d4
Reviewed-on: https://chromium-review.googlesource.com/c/1242013
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/preprocessor/DirectiveParser.h b/src/compiler/preprocessor/DirectiveParser.h
index 1fd6400..84c6ec4 100644
--- a/src/compiler/preprocessor/DirectiveParser.h
+++ b/src/compiler/preprocessor/DirectiveParser.h
@@ -9,6 +9,7 @@
 
 #include "compiler/preprocessor/Lexer.h"
 #include "compiler/preprocessor/Macro.h"
+#include "compiler/preprocessor/Preprocessor.h"
 #include "compiler/preprocessor/SourceLocation.h"
 
 namespace angle
@@ -28,7 +29,7 @@
                     MacroSet *macroSet,
                     Diagnostics *diagnostics,
                     DirectiveHandler *directiveHandler,
-                    int maxMacroExpansionDepth);
+                    const PreprocessorSettings &settings);
     ~DirectiveParser() override;
 
     void lex(Token *token) override;
@@ -78,7 +79,7 @@
     Diagnostics *mDiagnostics;
     DirectiveHandler *mDirectiveHandler;
     int mShaderVersion;
-    int mMaxMacroExpansionDepth;
+    const PreprocessorSettings mSettings;
 };
 
 }  // namespace pp