mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: suppress warnings
* parse.y (parser_set_line): removed no longer used function. * parse.y (rb_strterm_heredoc_t): adjust type of sourceline to ruby_sourceline. * parse.y (rb_strterm_t): get rid of redefinition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b6e80c2260
commit
603a7bdc2f
1 changed files with 8 additions and 11 deletions
17
parse.y
17
parse.y
|
@ -349,12 +349,6 @@ static int parser_yyerror(struct parser_params*, const char*);
|
||||||
|
|
||||||
static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
|
static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
|
||||||
|
|
||||||
static inline void
|
|
||||||
parser_set_line(NODE *n, int l)
|
|
||||||
{
|
|
||||||
nd_set_line(n, l);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
rb_discard_node_gen(struct parser_params *parser, NODE *n)
|
rb_discard_node_gen(struct parser_params *parser, NODE *n)
|
||||||
{
|
{
|
||||||
|
@ -763,7 +757,10 @@ typedef struct rb_strterm_literal_struct {
|
||||||
} rb_strterm_literal_t;
|
} rb_strterm_literal_t;
|
||||||
|
|
||||||
typedef struct rb_strterm_heredoc_struct {
|
typedef struct rb_strterm_heredoc_struct {
|
||||||
VALUE sourceline;
|
union {
|
||||||
|
VALUE dummy;
|
||||||
|
int sourceline;
|
||||||
|
} u1;
|
||||||
VALUE term; /* `"END"` of `<<"END"` */
|
VALUE term; /* `"END"` of `<<"END"` */
|
||||||
VALUE lastline; /* the string of line that contains `<<"END"` */
|
VALUE lastline; /* the string of line that contains `<<"END"` */
|
||||||
union {
|
union {
|
||||||
|
@ -774,13 +771,13 @@ typedef struct rb_strterm_heredoc_struct {
|
||||||
|
|
||||||
#define STRTERM_HEREDOC IMEMO_FL_USER0
|
#define STRTERM_HEREDOC IMEMO_FL_USER0
|
||||||
|
|
||||||
typedef struct rb_strterm_struct {
|
struct rb_strterm_struct {
|
||||||
VALUE flags;
|
VALUE flags;
|
||||||
union {
|
union {
|
||||||
rb_strterm_literal_t literal;
|
rb_strterm_literal_t literal;
|
||||||
rb_strterm_heredoc_t heredoc;
|
rb_strterm_heredoc_t heredoc;
|
||||||
} u;
|
} u;
|
||||||
} rb_strterm_t;
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_strterm_mark(VALUE obj)
|
rb_strterm_mark(VALUE obj)
|
||||||
|
@ -6794,7 +6791,7 @@ parser_heredoc_restore(struct parser_params *parser, rb_strterm_heredoc_t *here)
|
||||||
lex_pend = lex_pbeg + RSTRING_LEN(line);
|
lex_pend = lex_pbeg + RSTRING_LEN(line);
|
||||||
lex_p = lex_pbeg + here->u3.lastidx;
|
lex_p = lex_pbeg + here->u3.lastidx;
|
||||||
heredoc_end = ruby_sourceline;
|
heredoc_end = ruby_sourceline;
|
||||||
ruby_sourceline = here->sourceline;
|
ruby_sourceline = here->u1.sourceline;
|
||||||
token_flush(parser);
|
token_flush(parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue