diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2023-12-01 16:22:30 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-12-05 13:40:28 +0000 |
| commit | a1e6e87df50aaef1dce280405b59ba2bfa93c0f3 (patch) | |
| tree | d1035ca4136096f9e8d83e22826dfb46bb54c304 /sys/linux | |
| parent | ada1d56f0f3c555123547e44695695f7d284b6d6 (diff) | |
compiler: require nested flags to be at the end of the list
This commit adds the requirement that nested flags must be at the end of
the list of values. For example,
flags1 = 1, 2, 3, 4, flags2
flags2 cannot be moved to another position in the list. The goal is to
simplify parsing of the list by humans.
Enforcing that the nested flags be at the end (vs. the beginning) makes
things a bit easier for the parser. If we enforced that they should be
at the beginning, then the parser would need to look further forward to
determine if a flags definition is an integer flags or a string flags.
flags1 = flags2, flags3, flags4, 5, 6
In this example, the parser would need to look to the 4th value in the
list to tell that it's an integer flags.
Suggested-by: Aleksandr Nogikh <nogikh@google.com>
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux')
0 files changed, 0 insertions, 0 deletions
