Added IEnumerable implementation

This commit is contained in:
arookas 2016-02-03 22:44:28 -05:00
parent c1dc527007
commit 05c8bce662

View file

@ -89,7 +89,7 @@ namespace arookas {
}
}
class sunScope {
class sunScope : IEnumerable<sunStorableSymbol> {
List<sunStorableSymbol> mStorables;
sunScopeType mType;
@ -142,6 +142,13 @@ namespace arookas {
public sunConstantSymbol ResolveConstant(string name) {
return ResolveStorable(name) as sunConstantSymbol;
}
public IEnumerator<sunStorableSymbol> GetEnumerator() {
return mStorables.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator() {
return GetEnumerator();
}
}
enum sunScopeType {