Support declaring functions as integer
This adds a new syntax for declaring functions integer: #external integer(<function name>(<arity)). If a function is declared integer, it may enable some variables to be detected as integer as well.
This commit is contained in:
@@ -49,12 +49,9 @@ struct TermDomainVisitor
|
||||
return ast::Domain::General;
|
||||
}
|
||||
|
||||
static ast::Domain visit(ast::Function &)
|
||||
static ast::Domain visit(ast::Function &function)
|
||||
{
|
||||
// Functions may return values of any type
|
||||
|
||||
// TODO: implement explicit integer specifications
|
||||
return ast::Domain::General;
|
||||
return function.declaration->domain;
|
||||
}
|
||||
|
||||
static ast::Domain visit(ast::Integer &)
|
||||
|
Reference in New Issue
Block a user