mirror of https://github.com/tbklang/tlang.git
Dependency
- Fixed comment - Implemented `clearFuncDefs()`
This commit is contained in:
parent
970c6e56bd
commit
1a7db7d544
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue