Dependency

- Fixed comment
- Implemented `clearFuncDefs()`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-08-21 09:21:36 +02:00
parent 970c6e56bd
commit 1a7db7d544
1 changed files with 19 additions and 2 deletions

View File

@ -98,13 +98,30 @@ private FunctionData[string] functions;
/**
* Returns the declared functions
*/
* Returns the declared functions
*/
public FunctionData[string] grabFunctionDefs()
{
return functions;
}
/**
* Clars the `FunctionData[string]` map
*
* This is called normally after the
* typechecking and code generation such
* that the module-static field inside
* this module can be cleared and not
* persist across compilations
*/
public void clearFuncDefs()
{
foreach(string key; functions.keys())
{
functions.remove(key);
}
}
/**
* Creates a new FunctionData and adds it to the
* list of declared functions