pub struct Dialect {
pub keywords: &'static [&'static str],
pub multi_punct: &'static [&'static str],
pub raw_strings: bool,
pub digit_separators: bool,
pub record_keywords: &'static [&'static str],
pub lambdas: bool,
}Expand description
The lexical parameters distinguishing one C-family language from another.
Fields§
§keywords: &'static [&'static str]Reserved words, lexed as TokenKind::Keyword. Contextual keywords
(override, final) are deliberately absent: they lex as identifiers,
matching how the language grammar treats them.
multi_punct: &'static [&'static str]Multi-character operators, ordered longest first for greedy matching.
raw_strings: boolWhether R"delim(...)delim" raw string literals exist (C++ only).
digit_separators: boolWhether ' may separate digits inside a number (C++14 and later).
record_keywords: &'static [&'static str]Keywords that introduce a record body (struct, union, and for C++
also class), reported as UnitKind::Record units.
lambdas: boolWhether [capture](params) { ... } lambdas exist (C++ only).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
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