aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-06-18 13:35:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-06-18 13:35:05 -0300
commitd7872dcf91eb2075312a03973a6cdb489610c796 (patch)
treed07d6d33355ad2c56dc6343317c3021294cf49f7 /lparser.c
parent14115170bc9411e1c13871b87e50d83d60a4bb1c (diff)
downloadlua-d7872dcf91eb2075312a03973a6cdb489610c796.tar.gz
lua-d7872dcf91eb2075312a03973a6cdb489610c796.tar.bz2
lua-d7872dcf91eb2075312a03973a6cdb489610c796.zip
small optimization (reorder of BinOpr enum to unify some cases
in switches)
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lparser.c b/lparser.c
index 753dbce2..d1016473 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.62 2009/04/30 17:42:21 roberto Exp roberto $ 2** $Id: lparser.c,v 2.63 2009/06/10 16:52:03 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -813,10 +813,10 @@ static const struct {
813 lu_byte right; /* right priority */ 813 lu_byte right; /* right priority */
814} priority[] = { /* ORDER OPR */ 814} priority[] = { /* ORDER OPR */
815 {6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7}, /* `+' `-' `*' `/' `%' */ 815 {6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7}, /* `+' `-' `*' `/' `%' */
816 {10, 9}, {5, 4}, /* power and concat (right associative) */ 816 {10, 9}, {5, 4}, /* ^, .. (right associative) */
817 {3, 3}, {3, 3}, /* equality and inequality */ 817 {3, 3}, {3, 3}, {3, 3}, /* ==, <, <= */
818 {3, 3}, {3, 3}, {3, 3}, {3, 3}, /* order */ 818 {3, 3}, {3, 3}, {3, 3}, /* ~=, >, >= */
819 {2, 2}, {1, 1} /* logical (and/or) */ 819 {2, 2}, {1, 1} /* and, or */
820}; 820};
821 821
822#define UNARY_PRIORITY 8 /* priority for unary operators */ 822#define UNARY_PRIORITY 8 /* priority for unary operators */