diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-18 12:30:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-18 12:30:50 -0300 |
commit | 2de803c250de373186afbbea0a5978f54c52850c (patch) | |
tree | a00499eac71bb427fd720e45bdfa2749dd134b51 /lex.c | |
parent | fa08b42dd851ae945df9796438ac0565939a00f2 (diff) | |
download | lua-2de803c250de373186afbbea0a5978f54c52850c.tar.gz lua-2de803c250de373186afbbea0a5978f54c52850c.tar.bz2 lua-2de803c250de373186afbbea0a5978f54c52850c.zip |
new header 'auxlib.h' + new function luaL_verror
Diffstat (limited to 'lex.c')
-rw-r--r-- | lex.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,9 +1,10 @@ | |||
1 | char *rcs_lex = "$Id: lex.c,v 2.41 1996/11/22 13:08:02 roberto Exp roberto $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.42 1997/02/07 13:49:46 roberto Exp roberto $"; |
2 | 2 | ||
3 | 3 | ||
4 | #include <ctype.h> | 4 | #include <ctype.h> |
5 | #include <string.h> | 5 | #include <string.h> |
6 | 6 | ||
7 | #include "auxlib.h" | ||
7 | #include "mem.h" | 8 | #include "mem.h" |
8 | #include "tree.h" | 9 | #include "tree.h" |
9 | #include "table.h" | 10 | #include "table.h" |
@@ -32,10 +33,8 @@ void lua_setinput (Input fn) | |||
32 | 33 | ||
33 | static void luaI_auxsyntaxerror (char *s, char *token) | 34 | static void luaI_auxsyntaxerror (char *s, char *token) |
34 | { | 35 | { |
35 | char msg[256]; | 36 | luaL_verror("%s;\n> last token read: \"%s\" at line %d in file %s", |
36 | sprintf (msg,"%s;\n> last token read: \"%s\" at line %d in file %s", | ||
37 | s, token, lua_linenumber, lua_parsedfile); | 37 | s, token, lua_linenumber, lua_parsedfile); |
38 | lua_error (msg); | ||
39 | } | 38 | } |
40 | 39 | ||
41 | void luaI_syntaxerror (char *s) | 40 | void luaI_syntaxerror (char *s) |