Allow . as {$a:$b} destructuring
This commit is contained in:
1 parent
38bfec1594
commit
7935d307f0
3 files changed
+611
-594
No files matched your search
+604
-594
File diff suppressed because it is too large.
Load diff
@@ -822,6 +822,9 @@ ObjPat:
|
||||
'$' IDENT {
|
||||
$$ = gen_object_matcher(gen_const($2), gen_op_unbound(STOREV, jv_string_value($2)));
|
||||
} |
|
||||
'$' IDENT ':' Pattern {
|
||||
$$ = gen_object_matcher(gen_const($2), BLOCK(gen_op_simple(DUP), gen_op_unbound(STOREV, jv_string_value($2)), $4));
|
||||
} |
|
||||
IDENT ':' Pattern {
|
||||
$$ = gen_object_matcher(gen_const($1), $3);
|
||||
} |
|
||||
|
||||
Reference in new issue
Block a user