Skip to content

Commit

Permalink
Merge branch '1.12.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
odino committed Apr 3, 2020
2 parents 3ddbae2 + 02b4b4f commit 1c3f206
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.0
1.12.1
Binary file modified docs/abs.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions evaluator/evaluator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ func TestAssignStatements(t *testing.T) {
expected interface{}
}{
{"a = 5; a;", 5},
{`a = {"b": {"c": {"d": ""}}}; a.b['c'].e = 123; a.b.c.d = 123; a.b.c.d`, 123},
{"a = 5 * 5; a;", 25},
{"a = 5; b = a; b;", 5},
{"a = 5; b = a; c = a + b + 5; c;", 15},
Expand Down
2 changes: 2 additions & 0 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ func (p *Parser) parseDottedExpression(object ast.Expression) ast.Expression {
exp := &ast.PropertyExpression{Token: t, Object: object}
exp.Property = p.parseIdentifier()
p.prevPropertyExpression = exp
p.prevIndexExpression = nil
return exp
}
}
Expand Down Expand Up @@ -950,6 +951,7 @@ func (p *Parser) parseIndexExpression(left ast.Expression) ast.Expression {
}
// support assignment to index expression: a[0] = 1
p.prevIndexExpression = exp
p.prevPropertyExpression = nil

return exp
}
Expand Down

0 comments on commit 1c3f206

Please sign in to comment.