From 3c546ddb209ce70e4d0bcfefc4c06baffbb820f4 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Tue, 21 Jan 2020 15:21:34 +0100 Subject: [PATCH] macro processor: declare function const --- src/macro/Environment.cc | 2 +- src/macro/Environment.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macro/Environment.cc b/src/macro/Environment.cc index 8815588c..76e34ab7 100644 --- a/src/macro/Environment.cc +++ b/src/macro/Environment.cc @@ -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(); } diff --git a/src/macro/Environment.hh b/src/macro/Environment.hh index 231b245d..7c4bed3f 100644 --- a/src/macro/Environment.hh +++ b/src/macro/Environment.hh @@ -40,7 +40,7 @@ namespace macro void define(FunctionPtr func, ExpressionPtr value); ExpressionPtr getVariable(const string &name) const; tuple 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); }