]> git.ozlabs.org Git - petitboot/blobdiff - discover/grub2/parser.y
discover/grub2: Add initial script infrastructure
[petitboot] / discover / grub2 / parser.y
index a8c02e284b6d7b4507003839e1d5eb483814617f..6461801b3287c5d044919b08e521eebf19dc3f18 100644 (file)
@@ -56,7 +56,7 @@ static void yyerror(struct grub2_parser *, char const *s);
 %%
 
 script: statements {
-               parser->statements = $1;
+               parser->script->statements = $1;
        }
 
 statements: statement {
@@ -73,7 +73,9 @@ statement: TOKEN_EOL {
        | words TOKEN_EOL {
                   $$ = create_statement_simple(parser, $1);
        }
-       | '{' statements '}' { $$ = NULL; }
+       | '{' statements '}' {
+               $$ = create_statement_block(parser, $2);
+       }
        | "if" TOKEN_DELIM statement
                "then" TOKEN_EOL
                statements