From 01aa72eaba624e348de046ab573f498861e2103f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 16 May 2024 06:13:53 +0200 Subject: [PATCH] :art: using statement --- src/lint.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lint.c b/src/lint.c index 04daf58..8ad2f43 100644 --- a/src/lint.c +++ b/src/lint.c @@ -952,6 +952,19 @@ ANN static void gwfmt_stmt_spread(Gwfmt *a, Spread_Def b) { gwfmt_nl(a); } +ANN static void gwfmt_stmt_using(Gwfmt *a, Stmt_Using b) { + COLOR(a, a->ls->config->colors[KeywordColor], "using"); + gwfmt_space(a); + if(b->alias.sym) { + gwfmt_symbol(a, b->alias.sym); + gwfmt_space(a); + gwfmt(a, ":"); + gwfmt_exp(a, b->d.exp); + } else + gwfmt_type_decl(a, b->d.td); + gwfmt_sc(a); +} + DECL_STMT_FUNC(gwfmt, void, Gwfmt *) ANN static void gwfmt_stmt_while(Gwfmt *a, Stmt_Flow b) { if (!b->is_do) {