* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / id.h
blob04cf72e97698240fb410972aa55dde43b12f1e0b
1 /**********************************************************************
3 id.h -
5 $Author: ko1 $
6 created at: Thu Jul 12 04:38:07 2007
8 Copyright (C) 2007 Koichi Sasada
10 **********************************************************************/
12 #ifndef RUBY_ID_H
13 #define RUBY_ID_H
15 #define ID_SCOPE_SHIFT 3
16 #define ID_SCOPE_MASK 0x07
17 #define ID_LOCAL 0x00
18 #define ID_INSTANCE 0x01
19 #define ID_GLOBAL 0x03
20 #define ID_ATTRSET 0x04
21 #define ID_CONST 0x05
22 #define ID_CLASS 0x06
23 #define ID_JUNK 0x07
24 #define ID_INTERNAL ID_JUNK
26 #include "parse.h"
28 #define symIFUNC ID2SYM(idIFUNC)
29 #define symCFUNC ID2SYM(idCFUNC)
31 enum ruby_method_ids {
32 idPLUS = '+',
33 idMINUS = '-',
34 idMULT = '*',
35 idDIV = '/',
36 idMOD = '%',
37 idLT = '<',
38 idLTLT = tLSHFT,
39 idLE = tLEQ,
40 idGT = '>',
41 idGE = tGEQ,
42 idEq = tEQ,
43 idEqq = tEQQ,
44 idNeq = tNEQ,
45 idNot = '!',
46 idBackquote = '`',
47 idEqTilde = tMATCH,
48 idAREF = tAREF,
49 idASET = tASET,
50 idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT,
51 tIntern,
52 tMethodMissing,
53 tLength,
54 tGets,
55 tSucc,
56 tEach,
57 tLambda,
58 tSend,
59 t__send__,
60 tInitialize,
61 #if SUPPORT_JOKE
62 tBitblt,
63 tAnswer,
64 #endif
65 tLAST_ID
68 #define idIntern ((tIntern<<ID_SCOPE_SHIFT)|ID_LOCAL)
69 #define idMethodMissing ((tMethodMissing<<ID_SCOPE_SHIFT)|ID_LOCAL)
70 #define idLength ((tLength<<ID_SCOPE_SHIFT)|ID_LOCAL)
71 #define idGets ((tGets<<ID_SCOPE_SHIFT)|ID_LOCAL)
72 #define idSucc ((tSucc<<ID_SCOPE_SHIFT)|ID_LOCAL)
73 #define idEach ((tEach<<ID_SCOPE_SHIFT)|ID_LOCAL)
74 #define idLambda ((tLambda<<ID_SCOPE_SHIFT)|ID_LOCAL)
75 #define idSend ((tSend<<ID_SCOPE_SHIFT)|ID_LOCAL)
76 #define id__send__ ((t__send__<<ID_SCOPE_SHIFT)|ID_LOCAL)
77 #define idInitialize ((tInitialize<<ID_SCOPE_SHIFT)|ID_LOCAL)
78 #if SUPPORT_JOKE
79 #define idBitblt ((tBitblt<<ID_SCOPE_SHIFT)|ID_LOCAL)
80 #define idAnswer ((tAnswer<<ID_SCOPE_SHIFT)|ID_LOCAL)
81 #endif
83 #endif /* RUBY_ID_H */