aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/AST.cpp b/AST.cpp
index 1fa6d8f6..62952521 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -110,6 +110,23 @@ void FunctionDefinition::checkTypeRequirements()
m_body->checkTypeRequirements();
}
+std::string FunctionDefinition::getCanonicalSignature()
+{
+ auto parameters = getParameters();
+ std::string ret = getName() + "(";
+ unsigned int i = 1;
+
+ for (ASTPointer<VariableDeclaration> const& member: parameters)
+ {
+ ret += member->getType()->toString();
+ if (i != parameters.size()) {
+ ret += ",";
+ }
+ }
+ ret += ")";
+ return ret;
+}
+
void Block::checkTypeRequirements()
{
for (shared_ptr<Statement> const& statement: m_statements)