2
0
Эх сурвалжийг харах

Merge pull request #610 from zhibog/master

Add bool flag to AST data in the parser in the core library
gingerBill 5 жил өмнө
parent
commit
2c91c21021

+ 1 - 0
core/odin/ast/ast.odin

@@ -282,6 +282,7 @@ Block_Stmt :: struct {
 	open:  tokenizer.Pos,
 	open:  tokenizer.Pos,
 	stmts: []^Stmt,
 	stmts: []^Stmt,
 	close: tokenizer.Pos,
 	close: tokenizer.Pos,
+	uses_do: bool,
 }
 }
 
 
 If_Stmt :: struct {
 If_Stmt :: struct {

+ 1 - 0
core/odin/parser/parser.odin

@@ -1217,6 +1217,7 @@ convert_stmt_to_body :: proc(p: ^Parser, stmt: ^ast.Stmt) -> ^ast.Stmt {
 	bs.stmts = make([]^ast.Stmt, 1);
 	bs.stmts = make([]^ast.Stmt, 1);
 	bs.stmts[0] = stmt;
 	bs.stmts[0] = stmt;
 	bs.close = stmt.end;
 	bs.close = stmt.end;
+	bs.uses_do = true;
 	return bs;
 	return bs;
 }
 }