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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user