mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
246c76e261
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
26 lines
564 B
C
26 lines
564 B
C
/**
|
|
** @file mruby/presym.h - Preallocated Symbols
|
|
**
|
|
** See Copyright Notice in mruby.h
|
|
*/
|
|
|
|
#ifndef MRUBY_PRESYM_H
|
|
#define MRUBY_PRESYM_H
|
|
|
|
#undef MRB_PRESYM_MAX
|
|
#define MRB_PRESYM_CSYM(sym, num) MRB_PRESYM__##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 {
|
|
#include <../build/presym.inc>
|
|
};
|
|
|
|
#undef MRB_PRESYM_CSYM
|
|
#undef MRB_PRESYM_QSYM
|
|
#undef MRB_PRESYM_SYM
|
|
|
|
#define MRB_SYM(sym) MRB_PRESYM__##sym
|
|
#define MRB_QSYM(sym) MRB_PRESYM_q_##sym
|
|
#endif /* MRUBY_PRESYM_H */
|