You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, building a member expression required cloning the Expr that
became the member expression's object. Now I changed things a bit, so
that the object expr doesn't need to be cloned.
This is used every time an Expr is parsed, so it's somewhat hot code,
and fixing the clone gave a consistent 2-4% speedup across tests on my
Macbook Pro.
let member = alt((member_expression_dot, member_expression_subscript)).context(expected("a member/property, e.g. size.x and size['height'] and size[0] are all different ways to access a member/property of 'size'"));
1377
-
letmut members:Vec<_> = repeat(1.., member)
1375
+
repeat(1.., member)
1378
1376
.context(expected("a sequence of at least one members/properties"))
1379
-
.parse_next(i)?;
1377
+
.parse_next(i)
1378
+
}
1380
1379
1380
+
/// Get a property of an object, or an index of an array, or a member of a collection.
1381
+
/// Can be arbitrarily nested, e.g. `people[i]['adam'].age`.
0 commit comments