diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-11-06 14:37:30 +0100 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-11-06 14:37:30 +0100 |
| commit | 1c814ac250fa96083981fecc7a5cf22e6440ed2f (patch) | |
| tree | 70bc99a3848819f0145268e8a61a88a675dabc22 /src | |
| parent | 55e5ec4dc1c57bfe5b2e717a7f2c9e54ad7504e9 (diff) | |
Incorrect use of auto_cast
Diffstat (limited to 'src')
| -rw-r--r-- | src/odin/printer/visit.odin | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index a7a9719..eb7a5f2 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -211,7 +211,10 @@ visit_disabled :: proc(p: ^Printer, node: ^ast.Node) -> ^Document { pos_one_line_before := node.pos pos_one_line_before.line -= 1 - move := cons(move_line(p, pos_one_line_before), escape_nest(move_line(p, node.pos))) + move := cons( + move_line(p, pos_one_line_before), + escape_nest(move_line(p, node.pos)), + ) for comment_before_or_in_line(p, node.end.line) { next_comment_group(p) @@ -2210,7 +2213,9 @@ visit_block_stmts :: proc( for stmt, i in stmts { last_index := max(0, i - 1) - if stmts[last_index].end.line == stmt.pos.line && i != 0 && stmt.pos.line not_in p.disabled_lines { + if stmts[last_index].end.line == stmt.pos.line && + i != 0 && + stmt.pos.line not_in p.disabled_lines { document = cons(document, break_with(";")) } @@ -2540,7 +2545,7 @@ visit_signature_field_flag :: proc( document := empty() if .Auto_Cast in flags { - document = cons_with_nopl(document, text("#auto_cast")) + document = cons_with_nopl(document, text("auto_cast")) } if .Any_Int in flags { |