1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use ;
use crate::;
use ;
/// Parses a `depends on` attribute.
/// If multiple dependencies are defined, they are connected with '&&'.
/// Dependencies are applied to all other options within this menu entry (which also accept an "if" expression).
/// See [https://www.kernel.org/doc/html/next/kbuild/kconfig-language.html#menu-attributes](https://www.kernel.org/doc/html/next/kbuild/kconfig-language.html#menu-attributes) for more information.
///
/// # Example
/// ```
/// use nom_kconfig::{
/// assert_parsing_eq,
/// attribute::{
/// parse_depends_on,
/// AndExpression, Atom, Expression, OrExpression, Term,
/// },
/// symbol::Symbol,
/// Attribute
/// };
///
/// assert_parsing_eq!(
/// parse_depends_on,
/// "depends on PCI",
/// Ok((
/// "",
/// Attribute::DependsOn(Expression::Term(AndExpression::Term(
/// Term::Atom(Atom::Symbol(Symbol::NonConstant("PCI".to_string())))
/// )))
/// ))
/// )
/// ```