Rename MRB_OPSYM() to MRB_QSYM().

Where `QSYM` means quoted symbols, which cannot be represented C
symbols, so specify aliases instead.

- operators: name of the operation, e.g. add for `+`
- predicates: add `_p` suffix instead of `?`
- bang methods: add `_b` suffix instead of `!`
- instance variables: add `a_` prefix instead of `@`
- global variables: add `d_` prefix instead of `@`
- class variables: unsupported; don't use them
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-05-15 18:04:57 +09:00
parent 6128ae61a8
commit 246c76e261
4 changed files with 20 additions and 8 deletions
+3 -3
View File
@@ -9,7 +9,7 @@
#undef MRB_PRESYM_MAX
#define MRB_PRESYM_CSYM(sym, num) MRB_PRESYM__##sym = (num<<1),
#define MRB_PRESYM_OPSYM(op, sym, num) MRB_PRESYM_op_##sym = (num<<1),
#define MRB_PRESYM_QSYM(src, sym, num) MRB_PRESYM_q_##sym = (num<<1),
#define MRB_PRESYM_SYM(sym, num)
enum mruby_presym {
@@ -17,9 +17,9 @@ enum mruby_presym {
};
#undef MRB_PRESYM_CSYM
#undef MRB_PRESYM_OPSYM
#undef MRB_PRESYM_QSYM
#undef MRB_PRESYM_SYM
#define MRB_SYM(sym) MRB_PRESYM__##sym
#define MRB_OPSYM(sym) MRB_PRESYM_op_##sym
#define MRB_QSYM(sym) MRB_PRESYM_q_##sym
#endif /* MRUBY_PRESYM_H */