Track if a non-preprocessor token has been seen and validate #extension with it.

Reland: Only report a warning instead of an error.

BUG=angleproject:989
BUG=483252

Change-Id: Ife3e7759cdef6bc0f41cae3c58c307682b608279
Reviewed-on: https://chromium-review.googlesource.com/269404
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/preprocessor/DiagnosticsBase.cpp b/src/compiler/preprocessor/DiagnosticsBase.cpp
index 4bcdfec..2e9ba6b 100644
--- a/src/compiler/preprocessor/DiagnosticsBase.cpp
+++ b/src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -123,6 +123,8 @@
         return "unexpected token after conditional expression";
       case PP_UNRECOGNIZED_PRAGMA:
         return "unrecognized pragma";
+      case PP_NON_PP_TOKEN_BEFORE_EXTENSION:
+        return "extension directive must occur before any non-preprocessor tokens";
       // Warnings end.
       default:
         assert(false);