diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-19 15:05:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-19 15:05:14 -0300 |
commit | feb2083730c718b8fa7de6824db1c1dfe7a5542a (patch) | |
tree | 29dda71837b7085a1d87caf8c95022442f0c70a8 /llex.h | |
parent | 8d2baf719cf8687dba1648da4c5d9450d0bb2c14 (diff) | |
download | lua-feb2083730c718b8fa7de6824db1c1dfe7a5542a.tar.gz lua-feb2083730c718b8fa7de6824db1c1dfe7a5542a.tar.bz2 lua-feb2083730c718b8fa7de6824db1c1dfe7a5542a.zip |
better control of source name
Diffstat (limited to 'llex.h')
-rw-r--r-- | llex.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.h,v 1.27 2000/05/25 18:59:59 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.28 2000/05/26 14:04:04 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -51,11 +51,12 @@ typedef struct LexState { | |||
51 | struct lua_State *L; | 51 | struct lua_State *L; |
52 | struct zio *z; /* input stream */ | 52 | struct zio *z; /* input stream */ |
53 | int linenumber; /* input line counter */ | 53 | int linenumber; /* input line counter */ |
54 | TString *source; /* current source name */ | ||
54 | } LexState; | 55 | } LexState; |
55 | 56 | ||
56 | 57 | ||
57 | void luaX_init (lua_State *L); | 58 | void luaX_init (lua_State *L); |
58 | void luaX_setinput (lua_State *L, LexState *LS, ZIO *z); | 59 | void luaX_setinput (lua_State *L, LexState *LS, ZIO *z, TString *source); |
59 | int luaX_lex (LexState *LS); | 60 | int luaX_lex (LexState *LS); |
60 | void luaX_checklimit (LexState *ls, int val, int limit, const char *msg); | 61 | void luaX_checklimit (LexState *ls, int val, int limit, const char *msg); |
61 | void luaX_syntaxerror (LexState *ls, const char *s, const char *token); | 62 | void luaX_syntaxerror (LexState *ls, const char *s, const char *token); |