Lines Matching defs:Literal
75 TokenTree::Literal(crate::Literal {
77 inner: crate::imp::Literal::Fallback(literal),
88 fn push_negative_literal(mut vec: RcVecMut<TokenTree>, mut literal: Literal) {
93 vec.push(TokenTree::Literal(crate::Literal::_new_fallback(literal)));
207 TokenTree::Literal(tt) => Display::fmt(tt, f),
810 panic!("Ident cannot be a number; use Literal instead");
897 pub(crate) struct Literal {
904 pub fn $name(n: $kind) -> Literal {
905 Literal::_new(format!(concat!("{}", stringify!($kind)), n))
912 pub fn $name(n: $kind) -> Literal {
913 Literal::_new(n.to_string())
918 impl Literal {
920 Literal {
927 Literal::_new(repr.to_owned())
963 pub fn f32_unsuffixed(f: f32) -> Literal {
968 Literal::_new(s)
971 pub fn f64_unsuffixed(f: f64) -> Literal {
976 Literal::_new(s)
979 pub fn string(t: &str) -> Literal {
1004 Literal::_new(repr)
1007 pub fn character(t: char) -> Literal {
1017 Literal::_new(repr)
1020 pub fn byte_string(bytes: &[u8]) -> Literal {
1043 Literal::_new(escaped)
1096 impl FromStr for Literal {
1130 impl Display for Literal {
1136 impl Debug for Literal {
1138 let mut debug = fmt.debug_struct("Literal");