<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Dec 20, 2018 at 12:26 PM Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
That should be<br>
<br>
o := new([<br>
'foo', 'bar',<br>
'object', new(['abc', 123]),<br>
'array', TJSArray.new(1,2,3)<br>
]);</blockquote></div><div><br></div><div>Using this:</div><div><br></div><div><div> o := new([</div><div> 'foo', 'bar',</div><div> 'object', new(['abc', 123]),</div><div> 'array', TJSArray.new(1,2,3)</div><div> ]);</div></div><div><br></div><div>will generate this:</div><div><br></div><div>$mod.o = pas.JS.new$1(["foo","bar","object",pas.JS.new$1(["abc",123]),"array",new Array(1,2,3)]);<br></div><div><br></div><div>Any change to upgrade the transpiler to use this:</div><div><br></div><div><div> o := new(</div><div> 'foo', 'bar',</div><div> 'object', new('abc', 123),</div><div> 'array', TJSArray.new(1,2,3)</div><div> );</div></div><div><br></div><div>to generate this?:</div><div><br></div><div>$mod.o = {"foo":"bar","object":{"abc",123},"array":new Array(1,2,3)};<br></div><div><br></div><div>best,</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div></div></div></div></div>