about summary refs log tree commit diff
path: root/pkg/lang/parser/exprs.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-04 13:09:18 +0200
committerMel <einebeere@gmail.com>2022-07-04 13:09:18 +0200
commite29ee3e310044ddb2356513808554a46de957659 (patch)
treeeef9b4b0ba523918beee7d0da5e49d9e02a97969 /pkg/lang/parser/exprs.go
parented9a0c8f0f3c1eed3582d722935cd1df1d055afd (diff)
downloadjinx-e29ee3e310044ddb2356513808554a46de957659.tar.zst
jinx-e29ee3e310044ddb2356513808554a46de957659.zip
Parse For Stmts
Diffstat (limited to 'pkg/lang/parser/exprs.go')
-rw-r--r--pkg/lang/parser/exprs.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/lang/parser/exprs.go b/pkg/lang/parser/exprs.go
index 8c2b475..56904a1 100644
--- a/pkg/lang/parser/exprs.go
+++ b/pkg/lang/parser/exprs.go
@@ -261,6 +261,10 @@ func (p *Parser) parseArrayLitExpr() (ast.Expr, error) {
 		}
 	}
 
+	if _, err := p.expect(token.RBracket); err != nil {
+		return ast.Expr{}, err
+	}
+
 	return ast.Expr{
 		At:   bracketTok.At,
 		Kind: ast.ExprKindArrayLit,