Skip empty lines in parseprog
1 files changed, 12 insertions(+), 4 deletions(-) M parse.c
M parse.c => parse.c +12 -4
@@ 159,14 159,22 @@ parseprog(TokenList *t) prog->tag = AstProg; while(peek(t) != TokEnd){ Ast *child; if(peek(t) == TokDel) Ast *child = nil; switch(peek(t)){ case TokDiamond: case TokNewline: break; case TokDel: child = parsefuncdef(t); else break; default: child = parseexpr(t, nil, nil); break; } if(peek(t) != TokEnd) parseseps(t, 1); addchild(prog, child); if(child) addchild(prog, child); } return prog; }