Skip to content

Commit 98e9a06

Browse files
committed
fixes
1 parent d6c4ca7 commit 98e9a06

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

expr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ static const char *exprString[] = {
9393
//" |--
9494
static uint64_t printSpace = 0;
9595

96-
static void print_space(){
97-
for(uint64_t i = 0;i < printSpace;i++)
98-
printf("%c", i%5==0?'|':' ');
96+
void expr_print_space(uint64_t sp){
97+
for(uint64_t i = 0;i < sp;i++)
98+
printf("%s", i%5 == 0 ? "|" : " ");
9999
}
100100

101101
static void expr_print2(Expression *expr){

expr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ Expression* expr_new(ExpressionType type);
6969
void expr_dispose();
7070
#ifdef DEBUG
7171
void expr_print(Expression *exp, uint64_t printSpace);
72+
void expr_print_space(uint64_t space);
73+
#define print_space() expr_print_space(printSpace)
7274
#endif

stmt.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ static const char *stmtString[] = {
132132
//" |--
133133
static uint64_t printSpace = 0;
134134

135-
static void print_space(){
136-
for(uint64_t i = 0;i < printSpace;i++)
137-
printf("%c", i%5 == 0?'|':' ');
138-
}
139-
140135
static void stmt_print2(Statement *stmt){
141136
printf("\n");
142137
uint64_t bak = printSpace;

0 commit comments

Comments
 (0)