Language actually gets properly stepped through using debugger!
This commit is contained in:
@@ -229,6 +229,11 @@ gen_expr(Ast_Expr *ast){
|
||||
}
|
||||
}
|
||||
|
||||
function void
|
||||
gen_line(Ast *node){
|
||||
genln("#line %d", node->pos->line+1);
|
||||
}
|
||||
|
||||
function void
|
||||
gen_ast(Ast *ast);
|
||||
function void
|
||||
@@ -236,6 +241,7 @@ gen_block(Ast_Block *block){
|
||||
gen("{");
|
||||
global_indent++;
|
||||
For(block->stmts) {
|
||||
gen_line(it);
|
||||
genln("");
|
||||
gen_ast(it);
|
||||
}
|
||||
@@ -248,7 +254,9 @@ gen_ast(Ast *ast){
|
||||
switch(ast->kind){
|
||||
|
||||
CASE(PACKAGE, Package){
|
||||
genln("#line 0 \"%s\"", node->name.str);
|
||||
For(node->ordered) {
|
||||
gen_line(it);
|
||||
genln("");
|
||||
gen_ast(it);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user