feature(parser): empty decl (#69)

This commit is contained in:
Xenxo Espasandín 2023-02-14 20:53:53 +01:00 committed by GitHub
parent 5fbb0cea7d
commit c1cfa44631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1364 additions and 1337 deletions

View File

@ -276,12 +276,16 @@ root
;
program
: program inline
: program SEMICOLON
{ $$ = std::move($1); }
| program inline
{ $$ = std::move($1); }
| program include
{ $$ = std::move($1); $$->includes.push_back(std::move($2)); }
| program declaration
{ $$ = std::move($1); $$->declarations.push_back(std::move($2)); }
| SEMICOLON
{ $$ = make_program(@$); }
| inline
{ $$ = make_program(@$); }
| include

File diff suppressed because it is too large Load Diff

View File

@ -5008,9 +5008,9 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 2334, ///< Last index in yytable_.
yylast_ = 2375, ///< Last index in yytable_.
yynnts_ = 92, ///< Number of nonterminal symbols.
yyfinal_ = 22 ///< Termination state number.
yyfinal_ = 23 ///< Termination state number.
};