mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Pluggable Regexp
This commit is contained in:
@@ -42,13 +42,11 @@ mrb_class(mrb_state *mrb, mrb_value v)
|
||||
case MRB_TT_MAIN:
|
||||
return mrb->object_class;
|
||||
|
||||
#ifdef ENABLE_REGEXP
|
||||
case MRB_TT_REGEX:
|
||||
case MRB_TT_MATCH:
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "type mismatch: %s given",
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "type mismatch: %s given",
|
||||
mrb_obj_classname(mrb, v));
|
||||
return mrb->nil_class; /* not reach */
|
||||
#endif
|
||||
default:
|
||||
return mrb_object(v)->c;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ struct mrb_parser_state {
|
||||
|
||||
enum mrb_lex_state_enum lstate;
|
||||
int sterm;
|
||||
int regexp;
|
||||
|
||||
unsigned int cond_stack;
|
||||
unsigned int cmdarg_stack;
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_ENCODING
|
||||
#include "encoding.h"
|
||||
#endif
|
||||
|
||||
#ifndef RB_GC_GUARD
|
||||
#define RB_GC_GUARD(v) v
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user