Added checks for webgl_ and _webgl_ reserved identifiers. This currently only checks variable and function names. Struct names and field names will be added in the another CL.
BUG=11
Review URL: http://codereview.appspot.com/1674050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@346 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index d12ea4b..5818043 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -170,7 +170,9 @@
else
symbolTable = &symbolTables[language];
- TParseContext parseContext(*symbolTable, intermediate, language, infoSink);
+ // TODO(alokp): Investigate if a parse-context is necessary here and
+ // if symbol-table can be shared between GLES2 and WebGL specs.
+ TParseContext parseContext(*symbolTable, intermediate, language, EShSpecGLES2, infoSink);
GlobalParseContext = &parseContext;
@@ -263,7 +265,7 @@
GenerateBuiltInSymbolTable(resources, infoSink, &symbolTable, compiler->getLanguage());
- TParseContext parseContext(symbolTable, intermediate, compiler->getLanguage(), infoSink);
+ TParseContext parseContext(symbolTable, intermediate, compiler->getLanguage(), compiler->getSpec(), infoSink);
parseContext.initializeExtensionBehavior();
GlobalParseContext = &parseContext;