Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
preprocessor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dynare
preprocessor
Commits
3c546ddb
Verified
Commit
3c546ddb
authored
Jan 21, 2020
by
Houtan Bastani
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macro processor: declare function const
parent
a8b7bd31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/macro/Environment.cc
src/macro/Environment.cc
+1
-1
src/macro/Environment.hh
src/macro/Environment.hh
+1
-1
No files found.
src/macro/Environment.cc
View file @
3c546ddb
...
@@ -67,7 +67,7 @@ Environment::getFunction(const string &name) const
...
@@ -67,7 +67,7 @@ Environment::getFunction(const string &name) const
}
}
codes
::
BaseType
codes
::
BaseType
Environment
::
getType
(
const
string
&
name
)
Environment
::
getType
(
const
string
&
name
)
const
{
{
return
getVariable
(
name
)
->
eval
()
->
getType
();
return
getVariable
(
name
)
->
eval
()
->
getType
();
}
}
...
...
src/macro/Environment.hh
View file @
3c546ddb
...
@@ -40,7 +40,7 @@ namespace macro
...
@@ -40,7 +40,7 @@ namespace macro
void
define
(
FunctionPtr
func
,
ExpressionPtr
value
);
void
define
(
FunctionPtr
func
,
ExpressionPtr
value
);
ExpressionPtr
getVariable
(
const
string
&
name
)
const
;
ExpressionPtr
getVariable
(
const
string
&
name
)
const
;
tuple
<
FunctionPtr
,
ExpressionPtr
>
getFunction
(
const
string
&
name
)
const
;
tuple
<
FunctionPtr
,
ExpressionPtr
>
getFunction
(
const
string
&
name
)
const
;
codes
::
BaseType
getType
(
const
string
&
name
);
codes
::
BaseType
getType
(
const
string
&
name
)
const
;
bool
isVariableDefined
(
const
string
&
name
)
const
noexcept
;
bool
isVariableDefined
(
const
string
&
name
)
const
noexcept
;
bool
isFunctionDefined
(
const
string
&
name
)
const
noexcept
;
bool
isFunctionDefined
(
const
string
&
name
)
const
noexcept
;
inline
bool
isSymbolDefined
(
const
string
&
name
)
const
noexcept
{
return
isVariableDefined
(
name
)
||
isFunctionDefined
(
name
);
}
inline
bool
isSymbolDefined
(
const
string
&
name
)
const
noexcept
{
return
isVariableDefined
(
name
)
||
isFunctionDefined
(
name
);
}
...
...
Houtan Bastani
@houtanb
mentioned in commit
5200cf6e
·
Jan 21, 2020
mentioned in commit
5200cf6e
mentioned in commit 5200cf6e5372d354a00c823a5edba225989989af
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment