nom_kconfig/attribute/
modules.rs

1use nom::{bytes::complete::tag, combinator::value, IResult, Parser};
2
3use crate::{util::ws, KconfigInput};
4
5/// The "modules" attribute declares the symbol to be used as the MODULES symbol, which enables the third modular state for all config symbols.
6/// At most one symbol may have the "modules" option set.
7///
8/// # Example
9/// ```
10/// use nom_kconfig::{assert_parsing_eq, attribute::parse_modules};
11/// assert_parsing_eq!(parse_modules, "modules", Ok(("", ())))
12/// ```
13pub fn parse_modules(input: KconfigInput) -> IResult<KconfigInput, ()> {
14    value((), ws(tag("modules"))).parse(input)
15}