numeral expressions keep their values in struct 'expdesc'

This commit is contained in:
Roberto Ierusalimschy
2005-10-03 11:02:40 -03:00
parent a77413acd0
commit 6dd0c6ccbc
3 changed files with 29 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lparser.h,v 1.54 2005/03/09 16:28:07 roberto Exp roberto $
** $Id: lparser.h,v 1.55 2005/04/25 19:24:10 roberto Exp roberto $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -23,6 +23,7 @@ typedef enum {
VTRUE,
VFALSE,
VK, /* info = index of constant in `k' */
VKNUM, /* nval = numerical value */
VLOCAL, /* info = local register */
VUPVAL, /* info = index of upvalue in `upvalues' */
VGLOBAL, /* info = index of table; aux = index of global name in `k' */
@@ -36,7 +37,10 @@ typedef enum {
typedef struct expdesc {
expkind k;
int info, aux;
union {
struct { int info, aux; } s;
lua_Number nval;
} u;
int t; /* patch list of `exit when true' */
int f; /* patch list of `exit when false' */
} expdesc;