Home
last modified time | relevance | path

Searched refs:Lit (Results 1 - 25 of 48) sorted by relevance

12

/third_party/rust/crates/syn/tests/
H A Dtest_lit.rs14 use syn::{Lit, LitFloat, LitInt, LitStr};
16 fn lit(s: &str) -> Lit { in lit()
21 Lit::new(lit) in lit()
31 Lit::Str(lit) => { in strings()
70 Lit::ByteStr(lit) => { in byte_strings()
102 Lit::Byte(lit) => { in bytes()
124 Lit::Char(lit) => { in chars()
150 Lit::Int(lit) => { in ints()
190 Lit::Float(lit) => { in floats()
228 let lit = syn::parse_str::<Lit>(toke in suffix()
[all...]
H A Dtest_parse_quote.rs5 use syn::{parse_quote, Attribute, Field, Lit, Pat, Stmt, Token};
94 Pat::Lit(ExprLit { in test_pat()
95 lit: Lit::Bool { in test_pat()
115 let punctuated: Punctuated<Lit, Token![|]> = parse_quote!(true | true); in test_punctuated()
118 Lit::Bool { in test_punctuated()
122 Lit::Bool { in test_punctuated()
128 let punctuated: Punctuated<Lit, Token![|]> = parse_quote!(true | true |); in test_punctuated()
131 Lit::Bool { in test_punctuated()
135 Lit::Bool { in test_punctuated()
155 Expr::Lit { in test_vec_stmt()
[all...]
H A Dtest_token_trees.rs8 use syn::Lit;
30 let parsed: Lit = syn::parse_str(code).unwrap(); in test_literal_mangling()
H A Dtest_size.rs6 use syn::{Expr, Item, Lit, Pat, Type};
35 assert_eq!(mem::size_of::<Lit>(), 24); in test_lit_size()
/third_party/rust/crates/syn/src/
H A Dlit.rs23 pub enum Lit { enum
146 /// use syn::{Attribute, Error, Expr, Lit, Meta, Path, Result};
159 /// if let Expr::Lit(expr) = &meta.value {
160 /// if let Lit::Str(lit_str) = &expr.lit {
803 pub fn Lit(marker: lookahead::TokenMarker) -> Lit { in Lit() functions
816 impl Parse for Lit {
820 return Ok((Lit::new(lit), rest)); in parse()
830 return Ok((Lit::Bool(lit_bool), rest)); in parse()
847 fn parse_negative_lit(neg: Punct, cursor: Cursor) -> Option<(Lit, Curso
1026 impl Lit { global() impls
[all...]
H A Dpat.rs24 Lit(PatLit),
282 } else if input.peek(Token![-]) || lookahead.peek(Lit) || lookahead.peek(Token![const]) in parse_single()
671 Lit(ExprLit),
679 PatRangeBound::Lit(pat) => Expr::Lit(pat), in into_expr()
687 PatRangeBound::Lit(pat) => Pat::Lit(pat), in into_pat()
706 let expr = if lookahead.peek(Lit) { in pat_range_bound()
707 PatRangeBound::Lit(input.parse()?) in pat_range_bound()
H A Dmeta.rs4 use crate::lit::Lit;
327 /// Expr::Lit(expr) => /* ... */
359 /// Expr::Lit(expr) => /* ... */
412 } else if input.peek(Lit) { in parse_meta_path()
H A Dpath.rs297 if input.peek(Lit) || input.peek(token::Brace) { in parse()
321 return if input.peek(Lit) || input.peek(token::Brace) { in parse()
380 if input.peek(Lit) {
382 return Ok(Expr::Lit(lit));
715 Expr::Lit(expr) => expr.to_tokens(tokens), in to_tokens()
/third_party/rust/crates/cxx/gen/build/src/syntax/
H A Dnamespace.rs7 use syn::{Expr, Ident, Lit, Meta, Token};
42 Expr::Lit(expr) => { in parse_meta()
43 if let Lit::Str(lit) = &expr.lit { in parse_meta()
H A Dattrs.rs9 use syn::{Attribute, Error, Expr, Lit, LitStr, Meta, Path, Result, Token};
199 if let Expr::Lit(expr) = &meta.value { in parse_doc_attribute()
200 if let Lit::Str(lit) = &expr.lit { in parse_doc_attribute()
250 Expr::Lit(expr) => { in parse_cxx_name_attribute()
251 if let Lit::Str(lit) = &expr.lit { in parse_cxx_name_attribute()
269 Expr::Lit(expr) => { in parse_rust_name_attribute()
270 if let Lit::Str(lit) = &expr.lit { in parse_rust_name_attribute()
H A Ddiscriminant.rs9 use syn::{Error, Expr, Lit, Result, Token, UnOp};
110 Expr::Lit(expr) => { in expr_to_discriminant()
111 if let Lit::Int(lit) = &expr.lit { in expr_to_discriminant()
/third_party/rust/crates/cxx/gen/lib/src/syntax/
H A Dnamespace.rs7 use syn::{Expr, Ident, Lit, Meta, Token};
42 Expr::Lit(expr) => { in parse_meta()
43 if let Lit::Str(lit) = &expr.lit { in parse_meta()
H A Dattrs.rs9 use syn::{Attribute, Error, Expr, Lit, LitStr, Meta, Path, Result, Token};
199 if let Expr::Lit(expr) = &meta.value { in parse_doc_attribute()
200 if let Lit::Str(lit) = &expr.lit { in parse_doc_attribute()
250 Expr::Lit(expr) => { in parse_cxx_name_attribute()
251 if let Lit::Str(lit) = &expr.lit { in parse_cxx_name_attribute()
269 Expr::Lit(expr) => { in parse_rust_name_attribute()
270 if let Lit::Str(lit) = &expr.lit { in parse_rust_name_attribute()
H A Ddiscriminant.rs9 use syn::{Error, Expr, Lit, Result, Token, UnOp};
110 Expr::Lit(expr) => { in expr_to_discriminant()
111 if let Lit::Int(lit) = &expr.lit { in expr_to_discriminant()
/third_party/rust/crates/cxx/macro/src/syntax/
H A Dnamespace.rs7 use syn::{Expr, Ident, Lit, Meta, Token};
42 Expr::Lit(expr) => { in parse_meta()
43 if let Lit::Str(lit) = &expr.lit { in parse_meta()
H A Dattrs.rs9 use syn::{Attribute, Error, Expr, Lit, LitStr, Meta, Path, Result, Token};
199 if let Expr::Lit(expr) = &meta.value { in parse_doc_attribute()
200 if let Lit::Str(lit) = &expr.lit { in parse_doc_attribute()
250 Expr::Lit(expr) => { in parse_cxx_name_attribute()
251 if let Lit::Str(lit) = &expr.lit { in parse_cxx_name_attribute()
269 Expr::Lit(expr) => { in parse_rust_name_attribute()
270 if let Lit::Str(lit) = &expr.lit { in parse_rust_name_attribute()
H A Ddiscriminant.rs9 use syn::{Error, Expr, Lit, Result, Token, UnOp};
110 Expr::Lit(expr) => { in expr_to_discriminant()
111 if let Lit::Int(lit) = &expr.lit { in expr_to_discriminant()
/third_party/rust/crates/cxx/gen/cmd/src/syntax/
H A Dnamespace.rs7 use syn::{Expr, Ident, Lit, Meta, Token};
42 Expr::Lit(expr) => { in parse_meta()
43 if let Lit::Str(lit) = &expr.lit { in parse_meta()
H A Dattrs.rs9 use syn::{Attribute, Error, Expr, Lit, LitStr, Meta, Path, Result, Token};
199 if let Expr::Lit(expr) = &meta.value { in parse_doc_attribute()
200 if let Lit::Str(lit) = &expr.lit { in parse_doc_attribute()
250 Expr::Lit(expr) => { in parse_cxx_name_attribute()
251 if let Lit::Str(lit) = &expr.lit { in parse_cxx_name_attribute()
269 Expr::Lit(expr) => { in parse_rust_name_attribute()
270 if let Lit::Str(lit) = &expr.lit { in parse_rust_name_attribute()
/third_party/rust/crates/cxx/syntax/
H A Dnamespace.rs7 use syn::{Expr, Ident, Lit, Meta, Token};
42 Expr::Lit(expr) => { in parse_meta()
43 if let Lit::Str(lit) = &expr.lit { in parse_meta()
H A Dattrs.rs9 use syn::{Attribute, Error, Expr, Lit, LitStr, Meta, Path, Result, Token};
199 if let Expr::Lit(expr) = &meta.value { in parse_doc_attribute()
200 if let Lit::Str(lit) = &expr.lit { in parse_doc_attribute()
250 Expr::Lit(expr) => { in parse_cxx_name_attribute()
251 if let Lit::Str(lit) = &expr.lit { in parse_cxx_name_attribute()
269 Expr::Lit(expr) => { in parse_rust_name_attribute()
270 if let Lit::Str(lit) = &expr.lit { in parse_rust_name_attribute()
/third_party/rust/crates/syn/src/gen/
H A Dclone.rs263 Expr::Lit(v0) => Expr::Lit(v0.clone()), in clone()
1325 impl Clone for Lit {
1328 Lit::Str(v0) => Lit::Str(v0.clone()), in clone()
1329 Lit::ByteStr(v0) => Lit::ByteStr(v0.clone()), in clone()
1330 Lit::Byte(v0) => Lit::Byte(v0.clone()), in clone()
1331 Lit in clone()
[all...]
H A Deq.rs282 (Expr::Lit(self0), Expr::Lit(other0)) => self0 == other0, in eq()
1247 impl Eq for Lit {}
1249 impl PartialEq for Lit {
1252 (Lit::Str(self0), Lit::Str(other0)) => self0 == other0, in eq()
1253 (Lit::ByteStr(self0), Lit::ByteStr(other0)) => self0 == other0, in eq()
1254 (Lit::Byte(self0), Lit in eq()
[all...]
/third_party/rust/crates/clap/clap_derive/src/utils/
H A Ddoc_comments.rs22 syn::Expr::Lit(syn::ExprLit { in extract_doc_comment()
23 lit: syn::Lit::Str(s), in extract_doc_comment()
/third_party/rust/crates/syn/tests/common/
H A Deq.rs155 use rustc_ast::token::{self, CommentKind, Delimiter, Lit, Nonterminal, Token, TokenKind};
490 spanless_eq_struct!(Lit; kind symbol suffix);
594 Tup(0) Binary(0 1 2) Unary(0 1) Lit(0) Cast(0 1) Type(0 1) Let(0 1 2 3)
610 Or(0) Path(0 1) Tuple(0) Box(0) Ref(0 1) Lit(0) Range(0 1 2) Slice(0) Rest
786 ExprKind::Lit(lit) => is_escaped_lit(lit, unescaped), in is_escaped_literal_token()
798 ExprKind::Lit(lit) => is_escaped_lit(lit, unescaped), in is_escaped_literal_attr_args()
817 fn is_escaped_lit(lit: &Lit, unescaped: Symbol) -> bool { in is_escaped_lit()
819 Lit { in is_escaped_lit()

Completed in 16 milliseconds

12