From 6dd0c6ccbcddc875933cab872008f57cbbbf997b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 3 Oct 2005 11:02:40 -0300 Subject: numeral expressions keep their values in struct 'expdesc' --- lparser.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lparser.h') diff --git a/lparser.h b/lparser.h index 44729492..35bdaf47 100644 --- a/lparser.h +++ b/lparser.h @@ -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; -- cgit v1.2.3-55-g6feb