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

pull/5981/head
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
1 changed files with 1 additions and 0 deletions

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) {
if node.name.starts_with('JS.') { return }
g.doc.gen_fac_fn(node.fields)
g.write('function ${g.js_name(node.name)}({ ')
for i, field in node.fields {