Merge pull request #610 from zhibog/master

Add bool flag to AST data in the parser in the core library
This commit is contained in:
gingerBill
2020-04-18 20:43:21 +01:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

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

View File

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