%type <statement> statement
%type <statements> statements
%type <statement> conditional
%type <statement> statement
%type <statements> statements
%type <statement> conditional
- | "if" TOKEN_DELIM conditional "fi" {
- $$ = create_statement_if(parser, $3, NULL);
+ | "if" TOKEN_DELIM conditional elifs "fi" {
+ $$ = create_statement_if(parser, $3, $4, NULL);
}
| "function" TOKEN_DELIM word TOKEN_DELIM '{' statements '}' {
$$ = create_statement_function(parser, $3, $6);
}
| "function" TOKEN_DELIM word TOKEN_DELIM '{' statements '}' {
$$ = create_statement_function(parser, $3, $6);
struct grub2_statement *create_statement_if(struct grub2_parser *parser,
struct grub2_statement *conditional,
struct grub2_statement *create_statement_if(struct grub2_parser *parser,
struct grub2_statement *conditional,
struct grub2_statements *else_case)
{
struct grub2_statement_if *stmt =
talloc(parser, struct grub2_statement_if);
struct grub2_statements *else_case)
{
struct grub2_statement_if *stmt =
talloc(parser, struct grub2_statement_if);