Make userdata fields/properties/methods case insensitive

While this can potentially cause collisions, this allows us to easily use Lua's style guide
This commit is contained in:
2018-11-20 14:17:15 +01:00
parent df8c7b99c9
commit 8f6d2591f3
2 changed files with 9 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ namespace UpsilonTests
var obj = new UserDataHelper();
const string input = @"
function test(o)
return o[""FieldString""]
return o.fieldString
end
";
var script = new Script(input);
@@ -63,7 +63,7 @@ end
var obj = new UserDataHelper();
const string input = @"
function test(o)
o[""FieldStringSet""] = ""Test""
o.FieldStringSet = ""Test""
end
";
var script = new Script(input);
@@ -79,7 +79,7 @@ end
var obj = new UserDataHelper();
const string input = @"
function test(o)
o[""TestMethod""]()
o.testMethod()
end
";
var script = new Script(input);
@@ -95,7 +95,7 @@ end
var obj = new UserDataHelper();
const string input = @"
function test(o)
return o[""Add""](100, 20)
return o.add(100, 20)
end
";
var script = new Script(input);