2 ** @file mruby/presym.h - Preallocated Symbols
4 ** See Copyright Notice in mruby.h
10 #if defined(MRB_NO_PRESYM)
11 # include <mruby/presym/disable.h>
12 #elif !defined(MRB_PRESYM_SCANNING)
13 # include <mruby/presym/enable.h>
17 * Where `mrb_intern_lit` is allowed for symbol interning, it is directly
18 * replaced by the symbol ID if presym is enabled by using the following
21 * MRB_OPSYM(xor) //=> ^ (Operator)
22 * MRB_CVSYM(xor) //=> @@xor (Class Variable)
23 * MRB_IVSYM(xor) //=> @xor (Instance Variable)
24 * MRB_SYM_B(xor) //=> xor! (Method with Bang)
25 * MRB_SYM_Q(xor) //=> xor? (Method with Question mark)
26 * MRB_SYM_E(xor) //=> xor= (Method with Equal)
27 * MRB_SYM(xor) //=> xor (Word characters)
29 * For `MRB_OPSYM`, specify the names corresponding to operators (see
30 * `MRuby::Presym::OPERATORS` in `lib/mruby/presym.rb` for the names that
31 * can be specified for it). Other than that, describe only word characters
32 * excluding leading and ending punctuations.
34 * These macros are expanded to `mrb_intern_lit` if presym is disabled,
35 * therefore the mruby state variable is required. The above macros can be
36 * used when the variable name is `mrb`. If you want to use other variable
37 * names, you need to use macros with `_2` suffix, such as `MRB_SYM_2`.
40 #endif /* MRUBY_PRESYM_H */