diff --git a/eiger/Execution/BuiltInTypes/Array.cs b/eiger/Execution/BuiltInTypes/Array.cs index 003c4ba..2ed0c00 100644 --- a/eiger/Execution/BuiltInTypes/Array.cs +++ b/eiger/Execution/BuiltInTypes/Array.cs @@ -75,6 +75,7 @@ public override void SetIndex(int idx, Value val) { if (idx < 0 || idx >= array.Length) throw new EigerError(filename, line, pos, "Index outside of bounds", EigerError.ErrorType.IndexError); + val.modifiers = array[idx].modifiers; array[idx] = val; } diff --git a/eiger/Execution/Interpreter.cs b/eiger/Execution/Interpreter.cs index 521c021..c3465f9 100644 --- a/eiger/Execution/Interpreter.cs +++ b/eiger/Execution/Interpreter.cs @@ -172,7 +172,7 @@ public static (bool, bool, Value) VisitBlockNode(ASTNode node, Dictionary symbolTable, ASTNode key, } else if (key.type == NodeType.Identifier) { + value.modifiers = symbolTable[key.value].modifiers; symbolTable[key.value] = value; } else if (key.type == NodeType.AttrAccess) diff --git a/eiger/stdlibs/event.ei b/eiger/stdlibs/event.ei index a450c8e..dd387f3 100644 --- a/eiger/stdlibs/event.ei +++ b/eiger/stdlibs/event.ei @@ -1,7 +1,7 @@ class Event let private subscribers = [] - func Event() end + func new() end func Subscribe(subscriber) subscribers += subscriber end diff --git a/eiger/stdlibs/iterator.ei b/eiger/stdlibs/iterator.ei index d254684..dfb9190 100644 --- a/eiger/stdlibs/iterator.ei +++ b/eiger/stdlibs/iterator.ei @@ -2,7 +2,7 @@ class Iterator let private iter let private length let private ptr = 0 - func Iterator(_iter) + func new(_iter) if _iter.type != "string" then if _iter.type != "array" then emitln("Not Iterable!")