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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
preprocessor
Commits
b3ec807b
Verified
Commit
b3ec807b
authored
5 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
macro processor: move changes from `
cd99bb3a
` to the header file
parent
9b9c5beb
No related branches found
No related tags found
No related merge requests found
Pipeline
#1627
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/macro/Directives.cc
+2
-14
2 additions, 14 deletions
src/macro/Directives.cc
src/macro/Directives.hh
+16
-4
16 additions, 4 deletions
src/macro/Directives.hh
with
18 additions
and
18 deletions
src/macro/Directives.cc
+
2
−
14
View file @
b3ec807b
...
@@ -39,14 +39,8 @@ Eval::interpret(ostream &output, bool no_line_macro)
...
@@ -39,14 +39,8 @@ Eval::interpret(ostream &output, bool no_line_macro)
}
}
}
}
void
Include
::
interpret
(
ostream
&
output
,
bool
no_line_macro
)
{
error
(
StackTrace
(
"@#include"
,
"should never be interpreted"
,
location
));
}
string
string
Include
::
interpretAndGetName
()
Include
::
interpretAndGetName
()
const
{
{
try
try
{
{
...
@@ -67,14 +61,8 @@ Include::interpretAndGetName()
...
@@ -67,14 +61,8 @@ Include::interpretAndGetName()
return
""
;
return
""
;
}
}
void
IncludePath
::
interpret
(
ostream
&
output
,
bool
no_line_macro
)
{
error
(
StackTrace
(
"@#includepath"
,
"should never be interpreted"
,
location
));
}
string
string
IncludePath
::
interpretAndGetPath
()
IncludePath
::
interpretAndGetPath
()
const
{
{
try
try
{
{
...
...
This diff is collapsed.
Click to expand it.
src/macro/Directives.hh
+
16
−
4
View file @
b3ec807b
...
@@ -69,8 +69,14 @@ namespace macro
...
@@ -69,8 +69,14 @@ namespace macro
public:
public:
Include
(
ExpressionPtr
expr_arg
,
Environment
&
env_arg
,
Tokenizer
::
location
location_arg
)
:
Include
(
ExpressionPtr
expr_arg
,
Environment
&
env_arg
,
Tokenizer
::
location
location_arg
)
:
Directive
(
env_arg
,
move
(
location_arg
)),
expr
{
move
(
expr_arg
)}
{
}
Directive
(
env_arg
,
move
(
location_arg
)),
expr
{
move
(
expr_arg
)}
{
}
void
interpret
(
ostream
&
output
,
bool
no_line_macro
)
override
;
// Not interpretable because we want the class to be immutable (for use with shared_ptr)
string
interpretAndGetName
();
// If it were interpretable, the name would need to be stored in a non-const variable
// rendering the class mutable
inline
void
interpret
(
ostream
&
output
,
bool
no_line_macro
)
override
{
error
(
StackTrace
(
"@#include"
,
"should never be interpreted"
,
location
));
}
string
interpretAndGetName
()
const
;
};
};
...
@@ -81,8 +87,14 @@ namespace macro
...
@@ -81,8 +87,14 @@ namespace macro
public:
public:
IncludePath
(
ExpressionPtr
expr_arg
,
Environment
&
env_arg
,
Tokenizer
::
location
location_arg
)
:
IncludePath
(
ExpressionPtr
expr_arg
,
Environment
&
env_arg
,
Tokenizer
::
location
location_arg
)
:
Directive
(
env_arg
,
move
(
location_arg
)),
expr
{
move
(
expr_arg
)}
{
}
Directive
(
env_arg
,
move
(
location_arg
)),
expr
{
move
(
expr_arg
)}
{
}
void
interpret
(
ostream
&
output
,
bool
no_line_macro
)
override
;
// Not interpretable because we want the class to be immutable (for use with shared_ptr)
string
interpretAndGetPath
();
// If it were interpretable, the name would need to be stored in a non-const variable
// rendering the class mutable
inline
void
interpret
(
ostream
&
output
,
bool
no_line_macro
)
override
{
error
(
StackTrace
(
"@#includepath"
,
"should never be interpreted"
,
location
));
}
string
interpretAndGetPath
()
const
;
};
};
...
...
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