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

jsgen: don't generate JS. struct decls (#6035)

This commit is contained in:
spaceface777 2020-08-01 22:27:25 +02:00 committed by GitHub
parent adafd24819
commit 1feca22e28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1045,6 +1045,7 @@ fn (mut g JsGen) gen_hash_stmt(it ast.HashStmt) {
} }
fn (mut g JsGen) gen_struct_decl(node ast.StructDecl) { fn (mut g JsGen) gen_struct_decl(node ast.StructDecl) {
if node.name.starts_with('JS.') { return }
g.doc.gen_fac_fn(node.fields) g.doc.gen_fac_fn(node.fields)
g.write('function ${g.js_name(node.name)}({ ') g.write('function ${g.js_name(node.name)}({ ')
for i, field in node.fields { for i, field in node.fields {