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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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