From 504f7da4c3a5f0f7d8d11799a7a8baf601abdc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Thu, 19 Apr 2018 15:07:35 +0200 Subject: [PATCH] Add unknown variable domain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before being able to tell whether a variable’s domain is general or integer, it is necessary to flag it as “unknown.” --- include/anthem/AST.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/anthem/AST.h b/include/anthem/AST.h index e5f3390..d9ff875 100644 --- a/include/anthem/AST.h +++ b/include/anthem/AST.h @@ -348,19 +348,20 @@ struct VariableDeclaration enum class Domain { + Unknown, General, Integer }; explicit VariableDeclaration(Type type) : type{type}, - domain{Domain::General} + domain{Domain::Unknown} { } explicit VariableDeclaration(Type type, std::string &&name) : type{type}, - domain{Domain::General}, + domain{Domain::Unknown}, name{std::move(name)} { }