Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
preprocessor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pablo Winant
preprocessor
Commits
6284e991
Verified
Commit
6284e991
authored
5 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
macro processor: remove unnecessary type specifiers
parent
ee972d96
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/macro/Directives.cc
+1
-1
1 addition, 1 deletion
src/macro/Directives.cc
src/macro/Driver.cc
+1
-1
1 addition, 1 deletion
src/macro/Driver.cc
src/macro/Parser.yy
+9
-9
9 additions, 9 deletions
src/macro/Parser.yy
with
11 additions
and
11 deletions
src/macro/Directives.cc
+
1
−
1
View file @
6284e991
...
@@ -75,7 +75,7 @@ Include::interpret(ostream &output, bool no_line_macro, vector<filesystem::path>
...
@@ -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
// 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.
// 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
// 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
)
catch
(
StackTrace
&
ex
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/macro/Driver.cc
+
1
−
1
View file @
6284e991
...
@@ -37,7 +37,7 @@ Driver::parse(const string &file_arg, const string &basename_arg, istream &modfi
...
@@ -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
;
command_line_defines_with_endl
<<
"@#define "
<<
var
<<
" = "
<<
val
<<
endl
;
Driver
m
(
env
,
true
);
Driver
m
(
env
,
true
);
istream
is
(
command_line_defines_with_endl
.
rdbuf
());
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
// Handle empty files
...
...
This diff is collapsed.
Click to expand it.
src/macro/Parser.yy
+
9
−
9
View file @
6284e991
...
@@ -154,7 +154,7 @@ directive_one_line : INCLUDE expr
...
@@ -154,7 +154,7 @@ directive_one_line : INCLUDE expr
;
;
name_list : NAME
name_list : NAME
{ $$ =
vector<string>
{$1}; }
{ $$ = {$1}; }
| name_list NAME
| name_list NAME
{
{
$1.emplace_back($2);
$1.emplace_back($2);
...
@@ -229,13 +229,13 @@ if_list1 : expr EOL
...
@@ -229,13 +229,13 @@ if_list1 : expr EOL
{
{
auto context = driver.popContext();
auto context = driver.popContext();
context.emplace_back(make_shared<TextNode>("\n", driver.env, @2));
context.emplace_back(make_shared<TextNode>("\n", driver.env, @2));
$$ =
vector<pair<ExpressionPtr, vector<DirectivePtr>>>
{{$1, context}};
$$ = {{$1, context}};
}
}
| expr EOL statements
| expr EOL statements
{
{
auto context = driver.popContext();
auto context = driver.popContext();
context.emplace_back(make_shared<TextNode>("\n", driver.env, @3));
context.emplace_back(make_shared<TextNode>("\n", driver.env, @3));
$$ =
vector<pair<ExpressionPtr, vector<DirectivePtr>>>
{{$1, context}};
$$ = {{$1, context}};
}
}
| if_list1 elseif
| if_list1 elseif
{
{
...
@@ -297,25 +297,25 @@ function : NAME LPAREN RPAREN
...
@@ -297,25 +297,25 @@ function : NAME LPAREN RPAREN
;
;
function_args : symbol
function_args : symbol
{ $$ =
vector<ExpressionPtr>
{$1}; }
{ $$ = {$1}; }
| function_args COMMA symbol
| function_args COMMA symbol
{ $1.emplace_back($3); $$ = $1; }
{ $1.emplace_back($3); $$ = $1; }
;
;
comma_expr : %empty
comma_expr : %empty
{ $$ =
vector<ExpressionPtr>
{}; }
{ $$ = {}; }
| expr
| expr
{ $$ =
vector<ExpressionPtr>
{$1}; }
{ $$ = {$1}; }
| comma_expr COMMA expr
| comma_expr COMMA expr
{ $1.emplace_back($3); $$ = $1; }
{ $1.emplace_back($3); $$ = $1; }
;
;
tuple_comma_expr : %empty
tuple_comma_expr : %empty
{ $$ =
vector<ExpressionPtr>
{}; }
{ $$ = {}; }
| expr COMMA
| expr COMMA
{ $$ =
vector<ExpressionPtr>
{$1}; }
{ $$ = {$1}; }
| expr COMMA expr
| expr COMMA expr
{ $$ =
vector<ExpressionPtr>
{$1, $3}; }
{ $$ = {$1, $3}; }
| tuple_comma_expr COMMA expr
| tuple_comma_expr COMMA expr
{ $1.emplace_back($3); $$ = $1; }
{ $1.emplace_back($3); $$ = $1; }
;
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment