Home
last modified time | relevance | path

Searched refs:BoolLit (Results 1 – 8 of 8) sorted by relevance

/external/rust/crates/litrs/src/bool/
Dtests.rs2 Literal, BoolLit,
10 assert_parse_ok_eq($input, BoolLit::parse($input), $expected, "BoolLit::parse");
18 assert_bool_parse!("false", BoolLit::False); in parse_ok()
19 assert_bool_parse!("true", BoolLit::True); in parse_ok()
40 assert!(!BoolLit::False.value()); in value()
41 assert!(BoolLit::True.value()); in value()
46 assert_eq!(BoolLit::False.as_str(), "false"); in as_str()
47 assert_eq!(BoolLit::True.as_str(), "true"); in as_str()
Dmod.rs14 pub enum BoolLit { enum
19 impl BoolLit { impl
47 impl fmt::Display for BoolLit { implementation
/external/rust/crates/litrs/src/
Dtests.rs55 let _ = crate::BoolLit::parse(input);
108 BoolLit, ByteLit, ByteStringLit, CharLit, FloatLit, IntegerLit, StringLit, err::TokenKind in proc_macro()
255 BoolLit::try_from(TokenTree::from(pm_bytestr_lit.clone())), in proc_macro()
256 expected: TokenKind::BoolLit, in proc_macro()
260 BoolLit::try_from(TokenTree::from(pm_i16_lit.clone())), in proc_macro()
261 expected: TokenKind::BoolLit, in proc_macro()
281 BoolLit::try_from(TokenTree::from(punct)), in proc_macro()
282 expected: TokenKind::BoolLit, in proc_macro()
297 use crate::BoolLit; in bool_try_from_tt()
302 assert_eq!(BoolLit::try_from(TokenTree::Ident(ident("true"))).unwrap(), BoolLit::True); in bool_try_from_tt()
[all …]
Dimpls.rs43 impl_specific_lit_to_lit!(crate::BoolLit, Bool);
89 => return Ok(Literal::Bool(crate::BoolLit::True)),
91 => return Ok(Literal::Bool(crate::BoolLit::False)),
119 Literal::Bool(_) => TokenKind::BoolLit, in kind_of()
216 impl TryFrom<$($prefix)* TokenTree> for crate::BoolLit {
222 => return Ok(crate::BoolLit::True),
224 => return Ok(crate::BoolLit::False),
234 expected: TokenKind::BoolLit,
250 impl From<crate::BoolLit> for $($prefix)* Ident {
251 fn from(l: crate::BoolLit) -> Self {
Dparse.rs2 BoolLit,
23 b'f' if &*input == "false" => Ok(Self::Bool(BoolLit::False)), in parse()
24 b't' if &*input == "true" => Ok(Self::Bool(BoolLit::True)), in parse()
Dlib.rs140 bool::BoolLit,
173 Bool(BoolLit),
Derr.rs75 TokenKind::BoolLit => "a bool literal (`true` or `false`)", in fmt()
95 BoolLit, enumerator
/external/rust/crates/litrs/
DCHANGELOG.md15 - Add `impl From<BoolLit> for pm::Ident`