Layout queries support diff as placeholder for the current cell

This commit is contained in:
Matthias Koefferlein
2025-03-23 16:51:47 +01:00
parent a22f48d87a
commit efeb2c061b
9 changed files with 114 additions and 34 deletions
+8
View File
@@ -515,6 +515,14 @@ TEST(1)
EXPECT_EQ (s, "c1,c4,c5x");
}
{
// $_ is a placeholder for the current cell
db::LayoutQuery q ("$_.*");
db::LayoutQueryIterator iq (q, &g, &g.cell (g.cell_by_name ("c4").second));
std::string s = q2s_var (iq, "cell_name");
EXPECT_EQ (s, "c1,c3"); // child cells of "c4"
}
{
// Another way of saying "c2x.*"
db::LayoutQuery q ("*.$(cell_name=='c2x'?'*':'')");