Header: mruby/presym.h
Define Summary
- #define MRUBY_PRESYM_H
- #define MRB_OPSYM
Where
mrb_intern_litis allowed for symbol interning, it is directly replaced by the symbol ID using the following macros.MRB_OPSYM(xor) //=> ^ (Operator) MRB_GVSYM(xor) //=> $xor (Global Variable) MRB_CVSYM(xor) //=> @@xor (Class Variable) MRB_IVSYM(xor) //=> @xor (Instance Variable) MRB_SYM_B(xor) //=> xor! (Method with Bang) MRB_SYM_Q(xor) //=> xor? (Method with Question mark) MRB_SYM_E(xor) //=> xor= (Method with Equal) MRB_SYM(xor) //=> xor (Word characters)For
MRB_OPSYM, specify the names corresponding to operators (seeMRuby::Presym::OPERATORSinlib/mruby/presym.rbfor the names that can be specified for it). Other than that, describe only word characters excluding leading and ending punctuation.These macros are expanded to compile-time integer constants.
- #define MRB_GVSYM
- #define MRB_CVSYM
- #define MRB_IVSYM
- #define MRB_SYM_B
- #define MRB_SYM_Q
- #define MRB_SYM_E
- #define MRB_SYM
- #define MRB_OPSYM_2
backward compatibility: _2 variants accept but ignore mrb_state*
- #define MRB_GVSYM_2
- #define MRB_CVSYM_2
- #define MRB_IVSYM_2
- #define MRB_SYM_B_2
- #define MRB_SYM_Q_2
- #define MRB_SYM_E_2
- #define MRB_SYM_2
- #define MRB_PRESYM_DEFINE_VAR_AND_INITER
- #define MRB_PRESYM_INIT_SYMBOLS