make sure to print comments at the end of the file

This commit is contained in:
Daniel Gavin
2021-04-13 23:52:23 +02:00
parent b09e53d7fe
commit 2001384ae6
2 changed files with 17 additions and 2 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ push_comment :: proc(p: ^Printer, comment: tokenizer.Token) -> int {
}
@(private)
push_comments :: proc(p: ^Printer, pos: tokenizer.Pos, format_token: Format_Token) {
push_comments :: proc(p: ^Printer, pos: tokenizer.Pos) {
prev_comment: ^tokenizer.Token;
prev_comment_lines: int;
@@ -183,7 +183,7 @@ append_format_token :: proc(p: ^Printer, format_token: Format_Token) -> ^Format_
p.space_next_token = false;
}
push_comments(p, p.source_position, format_token);
push_comments(p, p.source_position);
unwrapped_line := p.current_line;
unwrapped_line.used = true;