Basic type inference

This commit is contained in:
dcodeIO
2017-12-23 13:48:04 +01:00
parent ad298c7bea
commit ca9c79185b
9 changed files with 221 additions and 48 deletions

View File

@ -1059,8 +1059,7 @@ export class Source extends Node {
for (let i: i32 = 0, k: i32 = this.statements.length; i < k; ++i) {
const statement: Statement = this.statements[i];
statement.serialize(sb);
const last: string = sb[sb.length - 1];
if (last.charCodeAt(last.length - 1) == CharCode.CLOSEBRACE)
if (builderEndsWith(sb, CharCode.CLOSEBRACE))
sb.push("\n");
else
sb.push(";\n");