mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
simplify case statements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -397,8 +397,6 @@ statement : LC statements RC {
|
|||||||
$$ = npval2(PV_WHILE, &@1, &@3);
|
$$ = npval2(PV_WHILE, &@1, &@3);
|
||||||
$$->u1.str = $2;
|
$$->u1.str = $2;
|
||||||
$$->u2.statements = $3; }
|
$$->u2.statements = $3; }
|
||||||
| switch_head RC /* empty list OK */ {
|
|
||||||
$$ = update_last($1, &@2); }
|
|
||||||
| switch_head case_statements RC {
|
| switch_head case_statements RC {
|
||||||
$$ = update_last($1, &@3);
|
$$ = update_last($1, &@3);
|
||||||
$$->u2.statements = $2;}
|
$$->u2.statements = $2;}
|
||||||
@@ -553,7 +551,8 @@ eval_arglist : word_list { $$ = nword($1, &@1); }
|
|||||||
| eval_arglist COMMA opt_word { $$ = linku1($1, nword($3, &@3)); }
|
| eval_arglist COMMA opt_word { $$ = linku1($1, nword($3, &@3)); }
|
||||||
;
|
;
|
||||||
|
|
||||||
case_statements: case_statement {$$=$1;}
|
case_statements: /* empty */ { $$ = NULL; }
|
||||||
|
| case_statement {$$=$1;}
|
||||||
| case_statements case_statement { $$ = linku1($1, $2); }
|
| case_statements case_statement { $$ = linku1($1, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user