diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-13 12:16:25 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-13 12:16:25 -0300 |
| commit | b17c76817d008de0e0de460c5d0fac4741d0fe02 (patch) | |
| tree | 02b5b942ab01853a5be4f385dceb8ec567c13008 /lex.c | |
| parent | b074306267b70015d770cb33c78dcf6cfe53fb45 (diff) | |
| download | lua-b17c76817d008de0e0de460c5d0fac4741d0fe02.tar.gz lua-b17c76817d008de0e0de460c5d0fac4741d0fe02.tar.bz2 lua-b17c76817d008de0e0de460c5d0fac4741d0fe02.zip | |
new function "luaI_findconstantbyname".
Diffstat (limited to 'lex.c')
| -rw-r--r-- | lex.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | char *rcs_lex = "$Id: lex.c,v 2.17 1995/10/03 18:06:10 roberto Exp $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.18 1995/10/06 13:10:53 roberto Exp roberto $"; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | #include <ctype.h> | 4 | #include <ctype.h> |
| @@ -200,7 +200,7 @@ int yylex (void) | |||
| 200 | return WRONGTOKEN; | 200 | return WRONGTOKEN; |
| 201 | save_and_next(); /* pass the second ']' */ | 201 | save_and_next(); /* pass the second ']' */ |
| 202 | *(yytextLast-2) = 0; /* erases ']]' */ | 202 | *(yytextLast-2) = 0; /* erases ']]' */ |
| 203 | yylval.vWord = luaI_findconstant(lua_constcreate(yytext+2)); | 203 | yylval.vWord = luaI_findconstantbyname(yytext+2); |
| 204 | return STRING; | 204 | return STRING; |
| 205 | } | 205 | } |
| 206 | 206 | ||
| @@ -260,7 +260,7 @@ int yylex (void) | |||
| 260 | } | 260 | } |
| 261 | next(); /* skip the delimiter */ | 261 | next(); /* skip the delimiter */ |
| 262 | *yytextLast = 0; | 262 | *yytextLast = 0; |
| 263 | yylval.vWord = luaI_findconstant(lua_constcreate(yytext)); | 263 | yylval.vWord = luaI_findconstantbyname(yytext); |
| 264 | return STRING; | 264 | return STRING; |
| 265 | } | 265 | } |
| 266 | 266 | ||
