Module bitflags::parser

source ·
Expand description

Parsing flags from text.

bitflags defines the following whitespace-insensitive grammar for flags formatted as text:

  • Flags: (Flag)|*
  • Flag: Identifier | HexNumber
  • Identifier: Any Rust identifier
  • HexNumber: 0x([0-9a-zA-Z])*

As an example, this is how Flags::A | Flags::B | 0x0c can be represented as text:

A | B | 0x0c

Structs

An error encountered while parsing flags from text.