[ruby-cvs:67401] yui-knk:r60220 (trunk): Store token first column number on RNode
yui-knk at ruby-lang.org
yui-knk at ruby-lang.org
Sat Oct 21 01:22:23 JST 2017
yui-knk 2017-10-21 01:22:22 +0900 (Sat, 21 Oct 2017)
New Revision: 60220
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60220
Log:
Store token first column number on RNode
* node.c (A_NODE_HEADER): Print column number.
* node.h (nd_column, nd_set_column): Define getter/setter
macros for column number of RNode.
* parse.y: Set first column number of tokens.
Notes:
* Use `@n` to get the location of token in parse.y.
* When we use `@n`, arguments of yyerror and yylex are
changed.
* Initialize column of nodes with -1 to make it easy
to detect nodes which we forget to set a column number.
Modified files:
trunk/node.c
trunk/node.h
trunk/parse.y
More information about the ruby-cvs
mailing list