pub struct LexOptions {
pub standard: Standard,
pub gating: Gating,
pub dollar_in_identifiers: bool,
pub trigraphs: bool,
pub wchar_bits: u32,
pub complex: bool,
}Expand description
Knobs for the lexer.
Fields§
§standard: StandardWhich standard’s lexical rules to apply.
gating: GatingHow a constant form a newer revision introduced is gated.
dollar_in_identifiers: boolAccept $ in identifiers, like GCC’s -fdollars-in-identifiers, which
is on by default; see crate::Options::dollar_in_identifiers.
trigraphs: boolWhether translation phase 1 replaces the nine trigraphs.
See trigraphs_enabled for who has them and why.
wchar_bits: u32How wide the target’s wchar_t is.
The one target property the lexer has an opinion about: it decides
what an L'\xffff' escape may hold and whether L"😀" is one element
or a surrogate pair, since Windows makes wchar_t 16 bits.
complex: boolWhether the complex types are available, which is what decides whether
an imaginary constant (2.0i) has a type; see
crate::Options::complex.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexOptions
impl RefUnwindSafe for LexOptions
impl Send for LexOptions
impl Sync for LexOptions
impl Unpin for LexOptions
impl UnsafeUnpin for LexOptions
impl UnwindSafe for LexOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more