diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-09 09:42:53 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-09 09:42:53 +0000 |
commit | cf8808bec66f666af120b9c4fad666a558d0e989 (patch) | |
tree | 573a5abf531f2a8374c8252dec2d0213715569bc /crawl-ref/source/luadgn.h | |
parent | 516b825d6d46281447d257d57d4cbec6cb5f523b (diff) | |
download | crawl-ref-cf8808bec66f666af120b9c4fad666a558d0e989.tar.gz crawl-ref-cf8808bec66f666af120b9c4fad666a558d0e989.zip |
Report the right line numbers for Lua errors in .crawlrc Lua.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6799 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/luadgn.h')
-rw-r--r-- | crawl-ref/source/luadgn.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/luadgn.h b/crawl-ref/source/luadgn.h index 8dd447c175..746f80be60 100644 --- a/crawl-ref/source/luadgn.h +++ b/crawl-ref/source/luadgn.h @@ -36,7 +36,7 @@ private: CT_SOURCE, CT_COMPILED }; - + private: int check_op(CLua &, int); std::string rewrite_chunk_prefix(const std::string &line, @@ -51,23 +51,24 @@ public: dlua_chunk(lua_State *ls); static dlua_chunk precompiled(const std::string &compiled); - + void clear(); void add(int line, const std::string &line2); void set_chunk(const std::string &s); - + int load(CLua &interp); + int run(CLua &interp); int load_call(CLua &interp, const char *function); void set_file(const std::string &s); const std::string &lua_string() const { return chunk; } std::string orig_error() const; bool rewrite_chunk_errors(std::string &err) const; - + bool empty() const; const std::string &compiled_chunk() const { return compiled; } - + void write(writer&) const; void read(reader&); }; |