summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-06 17:44:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-06 17:44:05 -0300
commit7dfa9520911e147be04a0dc04b21bcb01e045f76 (patch)
tree09c17d063c2672e39248723e9e2521dd668969bb /llex.c
parent02134b4a8791aad79b21d75fb8cef6a3a908a767 (diff)
downloadlua-github-7dfa9520911e147be04a0dc04b21bcb01e045f76.tar.gz
no more error for '\x' (with "invalid" x)
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/llex.c b/llex.c
index 7a19eb7e..75c1c28b 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 1.18 1998/03/20 14:18:18 roberto Exp roberto $
+** $Id: llex.c,v 1.19 1998/05/27 13:03:40 roberto Exp roberto $
** Lexical Analizer
** See Copyright Notice in lua.h
*/
@@ -339,11 +339,6 @@ int luaX_lex (LexState *LS) {
case 't': save('\t'); next(LS); break;
case 'v': save('\v'); next(LS); break;
case '\n': save('\n'); inclinenumber(LS); break;
- case '\\': case '"': case '\'': case '?': {
- save(LS->current);
- next(LS);
- break;
- }
default : {
if (isdigit(LS->current)) {
int c = 0;
@@ -356,10 +351,9 @@ int luaX_lex (LexState *LS) {
luaX_error(LS, "escape sequence too large");
save(c);
}
- else {
- save('\\');
+ else { /* handles \, ", ', and ? */
save(LS->current);
- luaX_error(LS, "invalid escape sequence");
+ next(LS);
}
break;
}