mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add scan target functions for presym
Add the following functions: - mrb_intern_cstr - mrb_define_singleton_method - mrb_define_class_under - mrb_define_module_under
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
* MRB_SYM(xor) //=> xor (Word characters)
|
||||
*
|
||||
* For `MRB_OPSYM`, specify the names corresponding to operators (see
|
||||
* `MRuby::Presym::OPERATORS` in `lib/mruby/presym.rb for the names that can
|
||||
* be specified for it). Other than that, describe only word characters
|
||||
* `MRuby::Presym::OPERATORS` in `lib/mruby/presym.rb` for the names that
|
||||
* can be specified for it). Other than that, describe only word characters
|
||||
* excluding leading and ending punctuations.
|
||||
*
|
||||
* These macros are expanded to `mrb_intern_lit` if presym is disabled,
|
||||
|
||||
@@ -11,14 +11,19 @@
|
||||
|
||||
#undef mrb_intern_lit
|
||||
#define mrb_intern_lit(mrb, name) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_intern_cstr(mrb, name) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_method(mrb, c, name, f, a) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_class_method(mrb, c, name, f, a) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_singleton_method(mrb, c, name, f, a) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_class(mrb, name, s) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_class_under(mrb, o, name, s) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_module(mrb, name) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_module_under(mrb, o, name) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_module_function(mrb, c, name, f, s) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_const(mrb, c, name, v) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
#define mrb_define_global_const(mrb, name, v) MRB_PRESYM_SCANNING_TAGGED(name)
|
||||
|
||||
|
||||
#define MRB_OPSYM(name) MRB_OPSYM__##name(mrb)
|
||||
#define MRB_CVSYM(name) MRB_PRESYM_SCANNING_TAGGED("@@" #name)
|
||||
#define MRB_IVSYM(name) MRB_PRESYM_SCANNING_TAGGED("@" #name)
|
||||
|
||||
Reference in New Issue
Block a user