diff src/lex.l @ 1053:3488f9e13125

[project @ 1995-01-19 22:51:58 by jwe]
author jwe
date Thu, 19 Jan 1995 22:52:06 +0000
parents 59f5eb2d5eb3
children 8c1a25cdfa81
line wrap: on
line diff
--- a/src/lex.l
+++ b/src/lex.l
@@ -1534,10 +1534,21 @@
 
       if (c == '\\')
 	{
-	  if (! have_continuation ())
-	    buf << (char) c;
-
-	  escape_pending = ! escape_pending;
+	  if (escape_pending)
+	    {
+	      buf << (char) c;
+	      escape_pending = 0;
+	    }
+	  else
+	    {
+	      if (have_continuation ())
+		escape_pending = 0;
+	      else
+		{
+		  buf << (char) c;
+		  escape_pending = 1;
+		}
+	    }
 	  continue;
 	}
       else if (c == '.')
@@ -1547,6 +1558,7 @@
 	}
       else if (c == '\n')
 	{
+	  error ("unterminated string constant");
 	  break;
 	}
       else if (c == delim)