mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y [ripper]: adjust line number for heredoc. [ruby-dev:24272]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67bb2004b1
commit
917f067885
2 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Sep 20 11:01:55 2004 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* parse.y [ripper]: adjust line number for heredoc. [ruby-dev:24272]
|
||||
|
||||
Mon Sep 20 04:49:22 2004 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* ext/ripper/ripper.rb.in: new const Ripper::PARSER_EVENT_TABLE.
|
||||
|
@ -14,9 +18,10 @@ Mon Sep 20 04:13:00 2004 Minero Aoki <aamine@loveruby.net>
|
|||
Mon Sep 20 03:46:54 2004 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* parse.y [ripper]: spaces before heredoc marker was lost.
|
||||
[ruby-dev:24272]
|
||||
|
||||
* keywords: rb_reserved_word() should be defined only in ruby
|
||||
core.
|
||||
core. [ruby-dev:24272]
|
||||
|
||||
* lex.c: sync with keywords.
|
||||
|
||||
|
|
17
parse.y
17
parse.y
|
@ -4938,8 +4938,22 @@ parser_tokadd_string(parser, func, term, paren, nest)
|
|||
return c;
|
||||
}
|
||||
|
||||
#define NEW_STRTERM(func, term, paren) \
|
||||
#define NEW_STRTERM0(func, term, paren) \
|
||||
rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
|
||||
#ifndef RIPPER
|
||||
#define NEW_STRTERM(func, term, paren) NEW_STRTERM0(func, term, paren)
|
||||
#else
|
||||
#define NEW_STRTERM(func, term, paren) ripper_new_strterm(parser, func, term, paren)
|
||||
static NODE *
|
||||
ripper_new_strterm(parser, func, term, paren)
|
||||
struct parser_params *parser;
|
||||
VALUE func, term, paren;
|
||||
{
|
||||
NODE *node = NEW_STRTERM0(func, term, paren);
|
||||
nd_set_line(node, ruby_sourceline);
|
||||
return node;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
parser_parse_string(parser, quote)
|
||||
|
@ -5055,6 +5069,7 @@ parser_heredoc_identifier(parser)
|
|||
rb_str_new(tok(), toklen()), /* nd_lit */
|
||||
len, /* nd_nth */
|
||||
lex_lastline); /* nd_orig */
|
||||
nd_set_line(lex_strterm, ruby_sourceline);
|
||||
parser_clear_token(parser);
|
||||
return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue