Report an error on the use of the line continuation character
TRAC #12260
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@277 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/preprocessor/cpp.c b/src/compiler/preprocessor/cpp.c
index 2b84d40..460df36 100644
--- a/src/compiler/preprocessor/cpp.c
+++ b/src/compiler/preprocessor/cpp.c
@@ -188,12 +188,9 @@
 	}
     mac.body = NewTokenStream(GetAtomString(atable, name), macros->pool);
     while (token != '\n') {
-        while (token == '\\') {
-            token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
-            if (token == '\n')
-                token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
-            else
-                RecordToken(mac.body, '\\', yylvalpp);
+        if (token == '\\') {
+            CPPErrorToInfoLog("The line continuation character (\\) is not part of the OpenGL ES Shading Language");
+            return token;
         }
         RecordToken(mac.body, token, yylvalpp);
         token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
diff --git a/src/compiler/preprocessor/scanner.c b/src/compiler/preprocessor/scanner.c
index 6645750..14eee59 100644
--- a/src/compiler/preprocessor/scanner.c
+++ b/src/compiler/preprocessor/scanner.c
@@ -664,10 +664,8 @@
             ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp);
             while (ch != '"' && ch != '\n' && ch != EOF) {
                 if (ch == '\\') {
-                    ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp);
-                    if (ch == '\n' || ch == EOF) {
-                        break;
-                    }
+                    CPPErrorToInfoLog("The line continuation character (\\) is not part of the OpenGL ES Shading Language");
+                    return -1;
                 }
                 if (len < MAX_STRING_LEN) {
                     string_val[len] = ch;