1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

make V.js compile

This commit is contained in:
Alexander Medvednikov
2019-09-16 18:29:04 +03:00
parent 3e52984e88
commit c76d09f9a5
3 changed files with 9 additions and 8 deletions

View File

@ -46,6 +46,11 @@ fn types_to_c(types []Type, table &Table) string {
sb.write(field.name)
sb.writeln('; // $field.typ')
}
sb.writeln('
constructor(obj) {
obj && Object.assign(this, obj);
}
')
sb.writeln('}\n')
}
return sb.str()