macro processor: remove unnecessary type specifiers
parent
ee972d9638
commit
6284e991fc
|
@ -75,7 +75,7 @@ Include::interpret(ostream &output, bool no_line_macro, vector<filesystem::path>
|
|||
// Calling `string()` method on filename and filename.stem() because of bug in
|
||||
// MinGW 8.3.0 that ignores implicit conversion to string from filename::path.
|
||||
// Test if bug exists when version of MinGW is upgraded on Debian runners
|
||||
m.parse(filename.string(), filename.stem().string(), incfile, output, false, vector<pair<string, string>>{}, paths);
|
||||
m.parse(filename.string(), filename.stem().string(), incfile, output, false, {}, paths);
|
||||
}
|
||||
catch (StackTrace &ex)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ Driver::parse(const string &file_arg, const string &basename_arg, istream &modfi
|
|||
command_line_defines_with_endl << "@#define " << var << " = " << val << endl;
|
||||
Driver m(env, true);
|
||||
istream is(command_line_defines_with_endl.rdbuf());
|
||||
m.parse("command_line_defines", "command_line_defines", is, output, debug, vector<pair<string, string>>{}, paths);
|
||||
m.parse("command_line_defines", "command_line_defines", is, output, debug, {}, paths);
|
||||
}
|
||||
|
||||
// Handle empty files
|
||||
|
|
|
@ -154,7 +154,7 @@ directive_one_line : INCLUDE expr
|
|||
;
|
||||
|
||||
name_list : NAME
|
||||
{ $$ = vector<string>{$1}; }
|
||||
{ $$ = {$1}; }
|
||||
| name_list NAME
|
||||
{
|
||||
$1.emplace_back($2);
|
||||
|
@ -229,13 +229,13 @@ if_list1 : expr EOL
|
|||
{
|
||||
auto context = driver.popContext();
|
||||
context.emplace_back(make_shared<TextNode>("\n", driver.env, @2));
|
||||
$$ = vector<pair<ExpressionPtr, vector<DirectivePtr>>> {{$1, context}};
|
||||
$$ = {{$1, context}};
|
||||
}
|
||||
| expr EOL statements
|
||||
{
|
||||
auto context = driver.popContext();
|
||||
context.emplace_back(make_shared<TextNode>("\n", driver.env, @3));
|
||||
$$ = vector<pair<ExpressionPtr, vector<DirectivePtr>>> {{$1, context}};
|
||||
$$ = {{$1, context}};
|
||||
}
|
||||
| if_list1 elseif
|
||||
{
|
||||
|
@ -297,25 +297,25 @@ function : NAME LPAREN RPAREN
|
|||
;
|
||||
|
||||
function_args : symbol
|
||||
{ $$ = vector<ExpressionPtr>{$1}; }
|
||||
{ $$ = {$1}; }
|
||||
| function_args COMMA symbol
|
||||
{ $1.emplace_back($3); $$ = $1; }
|
||||
;
|
||||
|
||||
comma_expr : %empty
|
||||
{ $$ = vector<ExpressionPtr>{}; }
|
||||
{ $$ = {}; }
|
||||
| expr
|
||||
{ $$ = vector<ExpressionPtr>{$1}; }
|
||||
{ $$ = {$1}; }
|
||||
| comma_expr COMMA expr
|
||||
{ $1.emplace_back($3); $$ = $1; }
|
||||
;
|
||||
|
||||
tuple_comma_expr : %empty
|
||||
{ $$ = vector<ExpressionPtr>{}; }
|
||||
{ $$ = {}; }
|
||||
| expr COMMA
|
||||
{ $$ = vector<ExpressionPtr>{$1}; }
|
||||
{ $$ = {$1}; }
|
||||
| expr COMMA expr
|
||||
{ $$ = vector<ExpressionPtr>{$1, $3}; }
|
||||
{ $$ = {$1, $3}; }
|
||||
| tuple_comma_expr COMMA expr
|
||||
{ $1.emplace_back($3); $$ = $1; }
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue