Skip to content

Commit

Permalink
removed duplications
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 14, 2012
1 parent 71770e5 commit 29d1b20
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions parse.y
Expand Up @@ -1709,21 +1709,19 @@ fname : tIDENTIFIER
| tFID
| op
{
/*%%%*/
lex_state = EXPR_END;
/*%%%*/
$$ = $1;
/*%
lex_state = EXPR_END;
$$ = $1;
%*/
}
| reswords
{
/*%%%*/
lex_state = EXPR_END;
/*%%%*/
$$ = $<id>1;
/*%
lex_state = EXPR_END;
$$ = $1;
%*/
}
Expand Down Expand Up @@ -4027,11 +4025,10 @@ string_dvar : tGVAR

symbol : tSYMBEG sym
{
/*%%%*/
lex_state = EXPR_END;
/*%%%*/
$$ = $2;
/*%
lex_state = EXPR_END;
$$ = dispatch1(symbol, $2);
%*/
}
Expand All @@ -4045,8 +4042,8 @@ sym : fname

dsym : tSYMBEG xstring_contents tSTRING_END
{
/*%%%*/
lex_state = EXPR_END;
/*%%%*/
if (!($$ = $2)) {
$$ = NEW_LIT(ID2SYM(rb_intern("")));
}
Expand All @@ -4068,7 +4065,6 @@ dsym : tSYMBEG xstring_contents tSTRING_END
}
}
/*%
lex_state = EXPR_END;
$$ = dispatch1(dyna_symbol, $2);
%*/
}
Expand Down Expand Up @@ -4164,13 +4160,11 @@ f_arglist : '(' f_args rparen
{
/*%%%*/
$$ = $2;
lex_state = EXPR_BEG;
command_start = Qtrue;
/*%
$$ = dispatch1(paren, $2);
%*/
lex_state = EXPR_BEG;
command_start = Qtrue;
%*/
}
| f_args term
{
Expand Down Expand Up @@ -8975,7 +8969,7 @@ static void
reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options)
{
VALUE err;
reg_fragment_setenc_gen(parser, str, options);
reg_fragment_setenc(str, options);
err = rb_reg_check_preprocess(str);
if (err != Qnil) {
err = rb_obj_as_string(err);
Expand Down Expand Up @@ -9678,7 +9672,7 @@ ripper_id2sym(ID id)
if (!name) {
rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
}
break;
return ID2SYM(id);
}
return ID2SYM(rb_intern(name));
}
Expand Down

0 comments on commit 29d1b20

Please sign in to comment.