feature(parser): empty decl (#69)
This commit is contained in:
parent
5fbb0cea7d
commit
c1cfa44631
@ -276,12 +276,16 @@ root
|
|||||||
;
|
;
|
||||||
|
|
||||||
program
|
program
|
||||||
: program inline
|
: program SEMICOLON
|
||||||
|
{ $$ = std::move($1); }
|
||||||
|
| program inline
|
||||||
{ $$ = std::move($1); }
|
{ $$ = std::move($1); }
|
||||||
| program include
|
| program include
|
||||||
{ $$ = std::move($1); $$->includes.push_back(std::move($2)); }
|
{ $$ = std::move($1); $$->includes.push_back(std::move($2)); }
|
||||||
| program declaration
|
| program declaration
|
||||||
{ $$ = std::move($1); $$->declarations.push_back(std::move($2)); }
|
{ $$ = std::move($1); $$->declarations.push_back(std::move($2)); }
|
||||||
|
| SEMICOLON
|
||||||
|
{ $$ = make_program(@$); }
|
||||||
| inline
|
| inline
|
||||||
{ $$ = make_program(@$); }
|
{ $$ = make_program(@$); }
|
||||||
| include
|
| include
|
||||||
|
2691
src/gsc/parser.cpp
2691
src/gsc/parser.cpp
File diff suppressed because it is too large
Load Diff
@ -5008,9 +5008,9 @@ switch (yykind)
|
|||||||
/// Constants.
|
/// Constants.
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
yylast_ = 2334, ///< Last index in yytable_.
|
yylast_ = 2375, ///< Last index in yytable_.
|
||||||
yynnts_ = 92, ///< Number of nonterminal symbols.
|
yynnts_ = 92, ///< Number of nonterminal symbols.
|
||||||
yyfinal_ = 22 ///< Termination state number.
|
yyfinal_ = 23 ///< Termination state number.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user