mruby  2.0.1
mruby is the lightweight implementation of the Ruby language
Classes | Macros | Typedefs | Enumerations | Functions
compile.h File Reference

More...

#include "common.h"
#include <mruby.h>
Include dependency graph for compile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrbc_context
 
struct  mrb_ast_node
 
struct  mrb_parser_message
 
struct  mrb_parser_heredoc_info
 
struct  mrb_parser_state
 

Macros

#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 mrbc_context mrbc_context
 
typedef struct mrb_ast_node mrb_ast_node
 

Enumerations

enum  mrb_lex_state_enum {
  EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN,
  EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME,
  EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE
}
 
enum  mrb_string_type {
  str_not_parsing = (0), str_squote = ( 0x01 ), str_dquote = ( 0x01 | 0x02 ), str_regexp = ( 0x01 | 0x04 | 0x02 ),
  str_sword = ( 0x01 | 0x08 | 0x20 ), str_dword = ( 0x01 | 0x08 | 0x20 | 0x02 ), str_ssym = ( 0x01 | 0x10 ), str_ssymbols = ( 0x01 | 0x10 | 0x20 ),
  str_dsymbols = ( 0x01 | 0x10 | 0x20 | 0x02 ), str_heredoc = ( 0x01 | 0x40 ), str_xquote = ( 0x01 | 0x80 | 0x02 )
}
 

Functions

mrbc_contextmrbc_context_new (mrb_state *mrb)
 
void mrbc_context_free (mrb_state *mrb, mrbc_context *cxt)
 
const char * mrbc_filename (mrb_state *mrb, mrbc_context *c, const char *s)
 
void mrbc_partial_hook (mrb_state *mrb, mrbc_context *c, int(*partial_hook)(struct mrb_parser_state *), void *data)
 
struct mrb_parser_statemrb_parser_new (mrb_state *)
 
void mrb_parser_free (struct mrb_parser_state *)
 
void mrb_parser_parse (struct mrb_parser_state *, mrbc_context *)
 
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_statemrb_parse_file (mrb_state *, FILE *, mrbc_context *)
 
struct mrb_parser_statemrb_parse_string (mrb_state *, const char *, mrbc_context *)
 
struct mrb_parser_statemrb_parse_nstring (mrb_state *, const char *, size_t, mrbc_context *)
 
struct RProcmrb_generate_code (mrb_state *, struct mrb_parser_state *)
 
mrb_value mrb_load_exec (mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c)
 
mrb_value mrb_load_file (mrb_state *, FILE *)
 
mrb_value mrb_load_file_cxt (mrb_state *, FILE *, mrbc_context *cxt)
 
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, mrbc_context *cxt)
 
mrb_value mrb_load_nstring_cxt (mrb_state *mrb, const char *s, size_t len, mrbc_context *cxt)
 

Detailed Description

See Copyright Notice in mruby.h