From 10d9ea3836546d30c15d8ee9d842ee432e58fbab Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 27 Jun 2024 16:34:15 +0200 Subject: 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. --- src/odin/printer/visit.odin | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- cgit v1.2.3