Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Willi Mutschler
preprocessor
Commits
3c546ddb
Verified
Commit
3c546ddb
authored
Jan 21, 2020
by
Houtan Bastani
Browse files
macro processor: declare function const
parent
a8b7bd31
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/macro/Environment.cc
View file @
3c546ddb
...
...
@@ -67,7 +67,7 @@ Environment::getFunction(const string &name) const
}
codes
::
BaseType
Environment
::
getType
(
const
string
&
name
)
Environment
::
getType
(
const
string
&
name
)
const
{
return
getVariable
(
name
)
->
eval
()
->
getType
();
}
...
...
src/macro/Environment.hh
View file @
3c546ddb
...
...
@@ -40,7 +40,7 @@ namespace macro
void
define
(
FunctionPtr
func
,
ExpressionPtr
value
);
ExpressionPtr
getVariable
(
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
isFunctionDefined
(
const
string
&
name
)
const
noexcept
;
inline
bool
isSymbolDefined
(
const
string
&
name
)
const
noexcept
{
return
isVariableDefined
(
name
)
||
isFunctionDefined
(
name
);
}
...
...
Write
Preview
Supports
Markdown
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