ruby-changes:51764
From: yui-knk <ko1@a...>
Date: Mon, 16 Jul 2018 11:07:48 +0900 (JST)
Subject: [ruby-changes:51764] yui-knk:r63976 (trunk): parse.y (heredoc_identifier): Update comment for term_len
yui-knk 2018-07-16 11:07:44 +0900 (Mon, 16 Jul 2018) New Revision: 63976 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63976 Log: parse.y (heredoc_identifier): Update comment for term_len Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 63975) +++ parse.y (revision 63976) @@ -5980,7 +5980,11 @@ parse_string(struct parser_params *p, rb https://github.com/ruby/ruby/blob/trunk/parse.y#L5980 static enum yytokentype heredoc_identifier(struct parser_params *p) { - int c = nextc(p), term, func = 0, term_len = 2; /* length of "<<" */ + /* + * term_len is length of `<<"END"` except `END`, + * in this case term_len is 4 (<, <, " and "). + */ + int c = nextc(p), term, func = 0, term_len = 2; enum yytokentype token = tSTRING_BEG; long len; int newline = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/