diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-06-27 16:34:15 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-06-27 16:34:15 +0200 |
| commit | 10d9ea3836546d30c15d8ee9d842ee432e58fbab (patch) | |
| tree | cf8ab5851e155de9aea0c81f3842c002ac525801 | |
| parent | 6209c11593a3ac175d058a1b12a884fa4d288620 (diff) | |
Fix @(require) import "core:fmt"
This previously showed a syntax error and that was fixed upstream in `core:odin` in aa27cd4b.
Make this work in the OLS formatter as well.
| -rw-r--r-- | src/odin/printer/visit.odin | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index cbf63ed..9407ec8 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -327,6 +327,13 @@ visit_decl :: proc( case ^Import_Decl: document := move_line(p, decl.pos) + if len(v.attributes) > 0 { + document = cons( + document, + visit_attributes(p, &v.attributes, v.pos), + ) + } + if v.name.text != "" { document = cons( document, |