Merge pull request #16 from google/pp-directive
authorJohn Kessenich <johnkslang@users.noreply.github.com>
Wed, 15 Jul 2015 01:36:29 +0000 (19:36 -0600)
committerJohn Kessenich <johnkslang@users.noreply.github.com>
Wed, 15 Jul 2015 01:36:29 +0000 (19:36 -0600)
Preprocessing directive handling

1  2 
Test/test-preprocessor-list
glslang/MachineIndependent/ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.h
glslang/MachineIndependent/ShaderLang.cpp
glslang/MachineIndependent/preprocessor/Pp.cpp

@@@ -3,6 -3,6 +3,7 @@@ preprocessor.errors.ver
  preprocessor.extensions.vert
  preprocessor.function_macro.vert
  preprocessor.line.vert
+ preprocessor.line.frag
  preprocessor.pragma.vert
  preprocessor.simple.vert
 +preprocessor.success_if_parse_would_fail.vert
@@@ -624,8 -624,9 +624,9 @@@ int TPpContext::CPPline(TPpToken* ppTok
      // "#line line source-string-number"
  
      int token = scanToken(ppToken);
+     const int directiveLoc = ppToken->loc.line;
      if (token == '\n') {
 -        parseContext.error(ppToken->loc, "must by followed by an integral literal", "#line", "");
 +        parseContext.ppError(ppToken->loc, "must by followed by an integral literal", "#line", "");
          return token;
      }