diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-04-11 20:35:40 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-04-11 21:40:14 +0200 |
| commit | 105c835e70a5bb80a256b3d10d1d03dee7bb23db (patch) | |
| tree | 01b0043d9fc1f7a2a94747280631861ee56fb50a /examples/print_tree.py | |
| parent | 0d267db1e40cddfc3196bf499dad0c5d59e51661 (diff) | |
Add helper for splitting expressions
I've had to implement the logic for walking reverse dependencies (from
select) a couple of times now, and it's always a bit tricky to get
right. Reduce code duplication and simplify things by adding a helper
function split_expr() that splits an expression into a list of either
its AND or OR operands.
A nice side effect is that e.g. the warning generated for selecting a
symbol with unsatisfied direct dependencies now lists the selecting
symbols in the order that they appear in the Kconfig files.
split_expr() might be helpful for splitting other types of expressions
as well, e.g. to put operands on separate lines when generating
documentation.
Diffstat (limited to 'examples/print_tree.py')
0 files changed, 0 insertions, 0 deletions
