Implement object literal parsing; Instantiate classes from object literals

Essentially, if the contextual type is a class with a constructor that takes zero arguments or doesn't have a constructor at all, an object literal can be used to initialize a new instance of that class with preset values.
This commit is contained in:
dcodeIO
2018-07-14 04:00:04 +02:00
parent 72cb1e9008
commit 9e508de69a
15 changed files with 946 additions and 12 deletions

View File

@ -0,0 +1,9 @@
var obj = {
a: 123,
b: "234",
"c": false,
d: {
a: 123,
"b": {}
}
};

View File

@ -0,0 +1,9 @@
var obj = {
a: 123,
b: "234",
"c": false,
d: {
a: 123,
"b": {}
}
};