Implemented `getGlobals()` for Program which will return all Variable objects representing variables defined globally
parent
87f7f458c8
commit
779a76acb6
|
@ -345,7 +345,13 @@ public class Program
|
|||
{
|
||||
Variable[] variables;
|
||||
|
||||
// foreach()
|
||||
foreach(Statement statement; statements)
|
||||
{
|
||||
if(typeid(statement) == typeid(Variable))
|
||||
{
|
||||
variables ~= cast(Variable)statement;
|
||||
}
|
||||
}
|
||||
|
||||
return variables;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue