summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-04 16:38:06 +0100
committerHaru <haru@dotalux.com>2013-12-05 11:47:53 +0100
commit4d1f7cc5aad1f5b541894bb1d458fe09d46f626e (patch)
treeb0dbba32688416bada6658f1cc479959dcb480c2 /src/map/script.h
parent34628660ed71e6d3b39571087131b214adf4a48f (diff)
downloadhercules-4d1f7cc5aad1f5b541894bb1d458fe09d46f626e.tar.gz
hercules-4d1f7cc5aad1f5b541894bb1d458fe09d46f626e.tar.bz2
hercules-4d1f7cc5aad1f5b541894bb1d458fe09d46f626e.tar.xz
hercules-4d1f7cc5aad1f5b541894bb1d458fe09d46f626e.zip
Improved script builtin function parser
- Removed duplicate code shared between script_hp_add and script_parse_builtin. - Improved error handling in script_hp_add to be on par with the script_parse_builtin version. - Added script->add_builtin function, providing a hooking point for plugins (i.e. text editor syntax definition generators) to obtain the builtin commands list. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 17120cd87..d1d131af3 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -535,6 +535,7 @@ struct script_interface {
int (*reload) (void);
/* parse */
struct script_code* (*parse) (const char* src,const char* file,int line,int options);
+ bool (*add_builtin) (const struct script_function *buildin, bool override);
void (*parse_builtin) (void);
const char* (*parse_subexpr) (const char* p,int limit);
const char* (*skip_space) (const char* p);