Skip to content

Commit

Permalink
🔥 various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Feb 25, 2024
1 parent a1d3a16 commit b6a9fa7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions include/gwfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ ANN void gwfmt_fptr_def(Gwfmt *a, Fptr_Def b);
ANN void gwfmt_type_def(Gwfmt *a, Type_Def b);
ANN void gwfmt_prim_def(Gwfmt *a, Prim_Def b);
ANN void gwfmt_ast(Gwfmt *a, Ast b);
ANN void gwfmt_type_decl(Gwfmt *a, const Type_Decl *b);
1 change: 0 additions & 1 deletion include/gwfmt_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ANN static void gwfmt_id_list(Gwfmt *a, ID_List b);
ANN static void gwfmt_tmplarg_list(Gwfmt *a, TmplArg_List b);
ANN static void gwfmt_tmpl(Gwfmt *a, Tmpl *b);
ANN static void gwfmt_range(Gwfmt *a, Range *b);
ANN static void gwfmt_type_decl(Gwfmt *a, Type_Decl *b);
ANN static void gwfmt_prim_id(Gwfmt *a, Symbol *b);
ANN static void gwfmt_prim_num(Gwfmt *a, struct gwint *b);
ANN static void gwfmt_prim_float(Gwfmt *a, m_float *b);
Expand Down
12 changes: 6 additions & 6 deletions src/lint.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ ANN static void gwfmt_effects(Gwfmt *a, Vector b) {
gwfmt_effect(a, (Symbol)vector_back(b));
}

ANN static void gwfmt_type_decl(Gwfmt *a, Type_Decl *b) {
ANN void gwfmt_type_decl(Gwfmt *a, const Type_Decl *b) {
if (GET_FLAG(b, const)) {
COLOR(a, "{+G}", "const");
gwfmt_space(a);
Expand Down Expand Up @@ -953,12 +953,12 @@ ANN static void gwfmt_stmt_for(Gwfmt *a, Stmt_For b) {
ANN static void gwfmt_stmt_each(Gwfmt *a, Stmt_Each b) {
COLOR(a, "{+M}", "foreach");
gwfmt_lparen(a);
if(b->idx) {
gwfmt_symbol(a, b->idx->var.tag.sym);
if(b->idx.tag.sym) {
gwfmt_symbol(a, b->idx.tag.sym);
gwfmt_comma(a);
gwfmt_space(a);
}
gwfmt_symbol(a, b->tag.sym);
gwfmt_symbol(a, b->var.tag.sym);
gwfmt_space(a);
COLOR(a, "{-}", ":");
gwfmt_space(a);
Expand All @@ -971,8 +971,8 @@ ANN static void gwfmt_stmt_each(Gwfmt *a, Stmt_Each b) {
ANN static void gwfmt_stmt_loop(Gwfmt *a, Stmt_Loop b) {
COLOR(a, "{+M}", "repeat");
gwfmt_lparen(a);
if (b->idx) {
gwfmt_symbol(a, b->idx->var.tag.sym);
if (b->idx.tag.sym) {
gwfmt_symbol(a, b->idx.tag.sym);
gwfmt_comma(a);
gwfmt_space(a);
}
Expand Down

0 comments on commit b6a9fa7

Please sign in to comment.