aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-16 02:07:44 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-16 02:07:44 +0000
commit8e63d6639dc1dd7270169b9206c40a0a864c3e3b (patch)
tree6c40f54ce36aeeb360683bba37222d1f1b00353d /parse.y
parentd590551fe40154cba82cbcf05f2324c64a1d10b3 (diff)
downloadruby-8e63d6639dc1dd7270169b9206c40a0a864c3e3b.tar.gz
parse.y (heredoc_identifier): Update comment for term_len
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 094341170b..94f6276134 100644
--- a/parse.y
+++ b/parse.y
@@ -5980,7 +5980,11 @@ parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
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;