diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-03 11:02:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-03 11:02:40 -0300 |
commit | 6dd0c6ccbcddc875933cab872008f57cbbbf997b (patch) | |
tree | 1be44c1159f8d1d0c06bd884e5c86498e7652f55 /lparser.h | |
parent | a77413acd0735754ffedde30bd09d86897964534 (diff) | |
download | lua-6dd0c6ccbcddc875933cab872008f57cbbbf997b.tar.gz lua-6dd0c6ccbcddc875933cab872008f57cbbbf997b.tar.bz2 lua-6dd0c6ccbcddc875933cab872008f57cbbbf997b.zip |
numeral expressions keep their values in struct 'expdesc'
Diffstat (limited to 'lparser.h')
-rw-r--r-- | lparser.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.h,v 1.54 2005/03/09 16:28:07 roberto Exp roberto $ | 2 | ** $Id: lparser.h,v 1.55 2005/04/25 19:24:10 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 | */ |
@@ -23,6 +23,7 @@ typedef enum { | |||
23 | VTRUE, | 23 | VTRUE, |
24 | VFALSE, | 24 | VFALSE, |
25 | VK, /* info = index of constant in `k' */ | 25 | VK, /* info = index of constant in `k' */ |
26 | VKNUM, /* nval = numerical value */ | ||
26 | VLOCAL, /* info = local register */ | 27 | VLOCAL, /* info = local register */ |
27 | VUPVAL, /* info = index of upvalue in `upvalues' */ | 28 | VUPVAL, /* info = index of upvalue in `upvalues' */ |
28 | VGLOBAL, /* info = index of table; aux = index of global name in `k' */ | 29 | VGLOBAL, /* info = index of table; aux = index of global name in `k' */ |
@@ -36,7 +37,10 @@ typedef enum { | |||
36 | 37 | ||
37 | typedef struct expdesc { | 38 | typedef struct expdesc { |
38 | expkind k; | 39 | expkind k; |
39 | int info, aux; | 40 | union { |
41 | struct { int info, aux; } s; | ||
42 | lua_Number nval; | ||
43 | } u; | ||
40 | int t; /* patch list of `exit when true' */ | 44 | int t; /* patch list of `exit when true' */ |
41 | int f; /* patch list of `exit when false' */ | 45 | int f; /* patch list of `exit when false' */ |
42 | } expdesc; | 46 | } expdesc; |