зеркало из https://github.com/github/ruby.git
node.h: Rename nd_reserved to nd_location
* node.h (RNode): Now nd_reserved is used to store location information, so rename nd_reserved to nd_location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
84d931415e
Коммит
5f77f1e30d
10
node.h
10
node.h
|
@ -224,7 +224,7 @@ enum node_type {
|
||||||
|
|
||||||
typedef struct RNode {
|
typedef struct RNode {
|
||||||
VALUE flags;
|
VALUE flags;
|
||||||
VALUE nd_reserved; /* ex nd_file */
|
VALUE nd_location; /* lineno and column */
|
||||||
union {
|
union {
|
||||||
struct RNode *node;
|
struct RNode *node;
|
||||||
ID id;
|
ID id;
|
||||||
|
@ -270,13 +270,13 @@ typedef struct RNode {
|
||||||
#define nd_line(n) (int)(((SIGNED_VALUE)RNODE(n)->flags)>>NODE_LSHIFT)
|
#define nd_line(n) (int)(((SIGNED_VALUE)RNODE(n)->flags)>>NODE_LSHIFT)
|
||||||
#define nd_set_line(n,l) \
|
#define nd_set_line(n,l) \
|
||||||
RNODE(n)->flags=((RNODE(n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
|
RNODE(n)->flags=((RNODE(n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
|
||||||
#define nd_column(n) (int)(RNODE(n)->nd_reserved & 0xffff)
|
#define nd_column(n) (int)(RNODE(n)->nd_location & 0xffff)
|
||||||
#define nd_set_column(n, v) \
|
#define nd_set_column(n, v) \
|
||||||
RNODE(n)->nd_reserved = (RNODE(n)->nd_reserved & ~0xffff) | ((v) > 0xffff ? 0xffff : ((unsigned int)(v)) & 0xffff)
|
RNODE(n)->nd_location = (RNODE(n)->nd_location & ~0xffff) | ((v) > 0xffff ? 0xffff : ((unsigned int)(v)) & 0xffff)
|
||||||
|
|
||||||
#define nd_lineno(n) (int)((RNODE(n)->nd_reserved >> 16) & 0xffff)
|
#define nd_lineno(n) (int)((RNODE(n)->nd_location >> 16) & 0xffff)
|
||||||
#define nd_set_lineno(n, v) \
|
#define nd_set_lineno(n, v) \
|
||||||
RNODE(n)->nd_reserved = (RNODE(n)->nd_reserved & ~0xffff0000) | (((v) > 0xffff ? 0xffff : ((unsigned int)(v)) & 0xffff) << 16)
|
RNODE(n)->nd_location = (RNODE(n)->nd_location & ~0xffff0000) | (((v) > 0xffff ? 0xffff : ((unsigned int)(v)) & 0xffff) << 16)
|
||||||
|
|
||||||
#define nd_head u1.node
|
#define nd_head u1.node
|
||||||
#define nd_alen u2.argc
|
#define nd_alen u2.argc
|
||||||
|
|
Загрузка…
Ссылка в новой задаче