![]() |
mruby 3.3.0
mruby is the lightweight implementation of the Ruby language
|
Go to the source code of this file.
Classes | |
struct | mrb_ccontext |
struct | mrb_ast_node |
struct | mrb_parser_message |
struct | mrb_parser_heredoc_info |
struct | mrb_parser_state |
Macros | |
#define | mrbc_context mrb_ccontext |
#define | mrbc_context_new mrb_ccontext_new |
#define | mrbc_context_free mrb_ccontext_free |
#define | mrbc_filename mrb_ccontext_filename |
#define | mrbc_partial_hook mrb_ccontext_partial_hook |
#define | mrbc_cleanup_local_variables mrb_ccontext_cleanup_local_variables |
#define | STR_FUNC_PARSING 0x01 |
#define | STR_FUNC_EXPAND 0x02 |
#define | STR_FUNC_REGEXP 0x04 |
#define | STR_FUNC_WORD 0x08 |
#define | STR_FUNC_SYMBOL 0x10 |
#define | STR_FUNC_ARRAY 0x20 |
#define | STR_FUNC_HEREDOC 0x40 |
#define | STR_FUNC_XQUOTE 0x80 |
#define | MRB_PARSER_TOKBUF_MAX (UINT16_MAX-1) |
#define | MRB_PARSER_TOKBUF_SIZE 256 |
Typedefs | |
typedef struct mrb_ccontext | mrb_ccontext |
typedef struct mrb_ast_node | mrb_ast_node |
Functions | |
mrb_ccontext * | mrb_ccontext_new (mrb_state *mrb) |
void | mrb_ccontext_free (mrb_state *mrb, mrb_ccontext *cxt) |
const char * | mrb_ccontext_filename (mrb_state *mrb, mrb_ccontext *c, const char *s) |
void | mrb_ccontext_partial_hook (mrb_state *mrb, mrb_ccontext *c, int(*partial_hook)(struct mrb_parser_state *), void *data) |
void | mrb_ccontext_cleanup_local_variables (mrb_state *mrb, mrb_ccontext *c) |
struct mrb_parser_state * | mrb_parser_new (mrb_state *) |
void | mrb_parser_free (struct mrb_parser_state *) |
void | mrb_parser_parse (struct mrb_parser_state *, mrb_ccontext *) |
void | mrb_parser_set_filename (struct mrb_parser_state *, char const *) |
mrb_sym | mrb_parser_get_filename (struct mrb_parser_state *, uint16_t idx) |
struct mrb_parser_state * | mrb_parse_file (mrb_state *, FILE *, mrb_ccontext *) |
struct mrb_parser_state * | mrb_parse_string (mrb_state *, const char *, mrb_ccontext *) |
struct mrb_parser_state * | mrb_parse_nstring (mrb_state *, const char *, size_t, mrb_ccontext *) |
struct RProc * | mrb_generate_code (mrb_state *, struct mrb_parser_state *) |
mrb_value | mrb_load_exec (mrb_state *mrb, struct mrb_parser_state *p, mrb_ccontext *c) |
mrb_value | mrb_load_file (mrb_state *, FILE *) |
program load functions Please note! Currently due to interactions with the GC calling these functions will leak one RProc object per function call. | |
mrb_value | mrb_load_file_cxt (mrb_state *, FILE *, mrb_ccontext *cxt) |
mrb_value | mrb_load_detect_file_cxt (mrb_state *mrb, FILE *fp, mrb_ccontext *c) |
mrb_value | mrb_load_string (mrb_state *mrb, const char *s) |
mrb_value | mrb_load_nstring (mrb_state *mrb, const char *s, size_t len) |
mrb_value | mrb_load_string_cxt (mrb_state *mrb, const char *s, mrb_ccontext *cxt) |
mrb_value | mrb_load_nstring_cxt (mrb_state *mrb, const char *s, size_t len, mrb_ccontext *cxt) |
See Copyright Notice in mruby.h
program load functions Please note! Currently due to interactions with the GC calling these functions will leak one RProc object per function call.
To prevent this save the current memory arena before calling and restore the arena right after, like so int ai = mrb_gc_arena_save(mrb); mrb_value status = mrb_load_string(mrb, buffer); mrb_gc_arena_restore(mrb, ai);