small fixes to the parser
This commit is contained in:
1 parent
b6aa549eb8
commit
934809397f
4 files changed
+13
-4
No files matched your search
@@ -325,6 +325,7 @@ If_Stmt :: struct {
|
||||
init: ^Stmt,
|
||||
cond: ^Expr,
|
||||
body: ^Stmt,
|
||||
else_pos: tokenizer.Pos,
|
||||
else_stmt: ^Stmt,
|
||||
}
|
||||
|
||||
@@ -490,7 +491,7 @@ unparen_expr :: proc(expr: ^Expr) -> (val: ^Expr) {
|
||||
}
|
||||
for {
|
||||
e, ok := val.derived.(Paren_Expr);
|
||||
if !ok {
|
||||
if !ok || e.expr == nil {
|
||||
break;
|
||||
}
|
||||
val = e.expr;
|
||||
|
||||
Reference in new issue
Block a user