From 9b174d3f2bdcf6f31b77e4afb29cf6bfce6b82a8 Mon Sep 17 00:00:00 2001 From: McBen Date: Wed, 4 Sep 2013 17:48:25 +0200 Subject: [PATCH 1/3] fixed scope of local variables & double definitions bug: local variables with equal names were not created. Instead references to the outter local are used. Same for double definitions. example: local a=1 -- <- ref=2 function b() local a=2 -- <- not created end local a=1 -- <- ref=2 local a=2 -- <- not created --- Scope.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Scope.lua b/Scope.lua index c4b8444..2eabe51 100644 --- a/Scope.lua +++ b/Scope.lua @@ -17,7 +17,7 @@ local Scope = { end, AddLocal = function(self, v) - table.insert(self.Locals, v) + table.insert(self.Locals, 1, v) end, AddGlobal = function(self, v) @@ -26,8 +26,6 @@ local Scope = { CreateLocal = function(self, name) local v - v = self:GetLocal(name) - if v then return v end v = { } v.Scope = self v.Name = name From 628b892a6d87cfb857546cd5b6c80818875f6ca1 Mon Sep 17 00:00:00 2001 From: McBen Date: Tue, 3 Sep 2013 20:13:43 +0200 Subject: [PATCH 2/3] fixed linux compability --- strict.lua => Strict.lua | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename strict.lua => Strict.lua (100%) diff --git a/strict.lua b/Strict.lua similarity index 100% rename from strict.lua rename to Strict.lua From 7375579ca232f42b4f873ffee58e8ae664f562f7 Mon Sep 17 00:00:00 2001 From: Elijah Frederickson Date: Sun, 8 Sep 2013 14:54:29 -0700 Subject: [PATCH 3/3] Added License (MIT) --- LICENSE.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..8e9ca9e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2012-2013 + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.