From 0e1058cfdd07a3751fce1c79b75241cf770266cf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 9 Jan 1998 12:44:55 -0200 Subject: small optimizations in switch order --- llex.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'llex.c') diff --git a/llex.c b/llex.c index a246aff9..3e647b10 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.11 1997/12/17 20:48:58 roberto Exp roberto $ +** $Id: llex.c,v 1.12 1997/12/22 17:52:20 roberto Exp roberto $ ** Lexical Analizer ** See Copyright Notice in lua.h */ @@ -268,15 +268,16 @@ int luaY_lex (YYSTYPE *l) LS->linelasttoken = LS->linenumber; while (1) { switch (LS->current) { - case '\n': - inclinenumber(LS); - LS->linelasttoken = LS->linenumber; - continue; case ' ': case '\t': case '\r': /* CR: to avoid problems with DOS */ next(LS); continue; + case '\n': + inclinenumber(LS); + LS->linelasttoken = LS->linenumber; + continue; + case '-': save_and_next(LS); if (LS->current != '-') return '-'; -- cgit v1.2.3-55-g6feb