From 0e7200e75bedb16c5f3282399ca58dffdda7bb64 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Tue, 9 Apr 2024 15:44:45 +0300 Subject: [PATCH] julefmt: fix token compatibility and update enum formatting --- src/comment.jule | 2 +- src/format.jule | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/comment.jule b/src/comment.jule index 176346c..90dbc67 100644 --- a/src/comment.jule +++ b/src/comment.jule @@ -18,7 +18,7 @@ struct CommentMap { } impl CommentMap { - static fn build(mut &tokens: []Token): CommentMap { + static fn build(mut &tokens: []&Token): CommentMap { let mut cm = CommentMap{ map: make([]&Comment, 0, 1 << 8), } diff --git a/src/format.jule b/src/format.jule index 5f71b71..c963e5c 100644 --- a/src/format.jule +++ b/src/format.jule @@ -14,7 +14,7 @@ use utf8 for std::unicode::utf8 struct Field { f: &ast::FieldDecl - token: Token + token: &Token expr: str } @@ -307,7 +307,7 @@ impl Formatter { self.write(self.indent) self.write(item.ident) if !item.auto_expr() { - self.write(" = ") + self.write(": ") self.format_expr(item.expr) } self.write(",")