macro processor: declare function const

issue#70
Houtan Bastani 2020-01-21 15:21:34 +01:00
parent a8b7bd31c5
commit 3c546ddb20
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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); }