From c74aea420c662039072f606b2d5ef1c73426e481 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Sat, 24 Aug 2024 14:29:55 +0300 Subject: Add more code Add some funcitons to work with variables, add more instructions and add ability to stop the code from `ccl_instruction` --- include/variable.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/variable.h (limited to 'include/variable.h') diff --git a/include/variable.h b/include/variable.h new file mode 100644 index 0000000..4480855 --- /dev/null +++ b/include/variable.h @@ -0,0 +1,24 @@ +#ifndef __CCL_VARIABLE_H__ +#define __CCL_VARIABLE_H__ + +#include "3cl.h" + + +/** + * Tries to find variable in list, NULL if not found. + * @see ccl_variable_getany + * @param vars Variable list + * @param name Variable name + */ +struct CCLVariable *ccl_variable_get(struct CCLVariable *vars, char name); + +/** + * Tries to find variable in current frame, then in root, NULL if not found. + * @see ccl_variable_get + * @param ccl CCL instance + * @param frame Current frame + * @param name Variable name + */ +struct CCLVariable *ccl_variable_getany(struct CCL *ccl, struct CCLFrame *frame, char name); + +#endif /* __CCL_VARIABLE_H__ */ -- cgit 1.4.1