blob: 7f8f48de883723e62d4b7cd2624df6c88f471ec3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
** re.c - Regexp class
**
** See Copyright Notice in mruby.h
*/
#include "mruby.h"
#include <string.h>
#include "mruby/string.h"
#include "re.h"
#include "mruby/array.h"
#include "mruby/class.h"
#include "error.h"
/*
* Document-class: RegexpError
*
* Raised when given an invalid regexp expression.
*
* Regexp.new("?")
*
* <em>raises the exception:</em>
*
* RegexpError: target of repeat operator is not specified: /?/
*/
/*
* Document-class: Regexp
*
* A <code>Regexp</code> holds a regular expression, used to match a pattern
* against strings. Regexps are created using the <code>/.../</code> and
* <code>%r{...}</code> literals, and by the <code>Regexp::new</code>
* constructor.
*
* :include: doc/re.rdoc
*/
void
mrb_init_regexp(mrb_state *mrb)
{
struct RClass *s;
s = mrb_define_class(mrb, "Regexp", mrb->object_class);
//MRB_SET_INSTANCE_TT(s, MRB_TT_REGEX);
}
|