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

cgen: add unsafe block braces and comments in generated code (#5674)

This commit is contained in:
yuyi
2020-07-05 19:32:39 +08:00
committed by GitHub
parent 0fb28eb42e
commit cda9240632

View File

@@ -836,7 +836,9 @@ fn (mut g Gen) stmt(node ast.Stmt) {
g.writeln('// TypeDecl')
}
ast.UnsafeStmt {
g.writeln('{ // Unsafe block')
g.stmts(node.stmts)
g.writeln('}')
}
}
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1)