Implement @set

This commit is contained in:
Nixon Enraght-Moony 2021-02-20 01:25:09 +00:00
parent a00eb7ee1d
commit cd5f603c31
3 changed files with 26 additions and 0 deletions

View file

@ -7,15 +7,18 @@
// @is nested.json "$.index[*][?(@.name=='l1')].kind" \"module\"
// @is - "$.index[*][?(@.name=='l1')].inner.is_crate" false
// @count - "$.index[*][?(@.name=='l1')].inner.items[*]" 2
// @set l1_id = - "$.index[*][?(@.name=='l1')].id"
pub mod l1 {
// @is nested.json "$.index[*][?(@.name=='l3')].kind" \"module\"
// @is - "$.index[*][?(@.name=='l3')].inner.is_crate" false
// @count - "$.index[*][?(@.name=='l3')].inner.items[*]" 1
// @set l3_id = - "$.index[*][?(@.name=='l3')].id"
pub mod l3 {
// @is nested.json "$.index[*][?(@.name=='L4')].kind" \"struct\"
// @is - "$.index[*][?(@.name=='L4')].inner.struct_type" \"unit\"
// @set l4_id = - "$.index[*][?(@.name=='L4')].id"
pub struct L4;
}
// @is nested.json "$.index[*][?(@.inner.span=='l3::L4')].kind" \"import\"