Skip to content

Commit

Permalink
🎨 using statement
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed May 16, 2024
1 parent 4287d6b commit 01aa72e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 01aa72e

Please sign in to comment.