Home
last modified time | relevance | path

Searched refs:quote (Results 1 – 25 of 1117) sorted by relevance

12345678910>>...45

/external/rust/crates/quote/tests/
Dtest.rs7 use quote::{format_ident, quote, quote_spanned, TokenStreamExt};
11 impl quote::ToTokens for X {
19 let tokens = quote! { in test_quote_impl()
63 let tokens = quote!(#x <#x> (#x) [#x] {#x}); in test_substitution()
74 assert_eq!("X X X X", quote!(#(#primes)*).to_string()); in test_iter()
76 assert_eq!("X , X , X , X ,", quote!(#(#primes,)*).to_string()); in test_iter()
78 assert_eq!("X , X , X , X", quote!(#(#primes),*).to_string()); in test_iter()
83 let generics = quote!( <'a, T> ); in test_advanced()
85 let where_clause = quote!( where T: Serialize ); in test_advanced()
87 let field_ty = quote!(String); in test_advanced()
[all …]
/external/rust/crates/bindgen/src/codegen/
Dhelpers.rs6 use quote::TokenStreamExt;
14 quote! { in repr()
24 quote! { in repr_list()
34 quote! { in derives()
40 quote! { in inline()
46 quote! { in must_use()
52 quote! { in non_exhaustive()
67 quote! { in link_name()
95 quote! { in blob()
99 quote! { in blob()
[all …]
Dmod.rs48 use quote::TokenStreamExt;
67 let mut path = vec![quote! { self }]; in top_level_path()
71 path.push(quote! { super }); in top_level_path()
89 path.push(quote! { #root_ident }); in root_import()
91 let mut tokens = quote! {}; in root_import()
92 tokens.append_separated(path, quote!(::)); in root_import()
94 quote! { in root_import()
353 quote! { *const #self } in to_ptr()
355 quote! { *mut #self } in to_ptr()
414 self.append_all(quote! { in append_implicit_template_params()
[all …]
Ddyngen.rs81 quote! { in get_tokens()
130 let signature = quote! { unsafe extern #abi fn ( #( #args),* ) #ret }; in push()
134 quote! { Result<#signature, ::libloading::Error> } in push()
137 self.struct_members.push(quote! { in push()
144 quote! { self.#ident } in push()
146 quote! { self.#ident.as_ref().expect("Expected function, got error.") } in push()
148 let call_body = quote! { in push()
155 self.struct_implementation.push(quote! { in push()
165 quote! { in push()
169 quote! { in push()
[all …]
/external/rust/crates/thiserror-impl/src/
Dexpand.rs3 use quote::{format_ident, quote, quote_spanned, ToTokens};
22 Some(quote! { in impl_struct()
33 Some(quote! { in impl_struct()
40 quote! { in impl_struct()
62 quote! { in impl_struct()
66 quote! { in impl_struct()
70 quote! { in impl_struct()
75 quote! { in impl_struct()
79 quote! { in impl_struct()
83 quote! { in impl_struct()
[all …]
/external/rust/crates/syn/tests/
Dtest_generics.rs4 use quote::quote;
9 let input = quote! { in test_split_for_impl()
103 let generated = quote! { in test_split_for_impl()
106 let expected = quote! { in test_split_for_impl()
116 let generated = quote! { in test_split_for_impl()
119 let expected = quote! { in test_split_for_impl()
127 let tokens = quote!('a); in test_ty_param_bound()
134 let tokens = quote!('_); in test_ty_param_bound()
141 let tokens = quote!(Debug); in test_ty_param_bound()
156 let tokens = quote!(?Sized); in test_ty_param_bound()
[all …]
Dtest_derive_input.rs4 use quote::quote;
9 let input = quote! { in test_unit()
28 let input = quote! { in test_struct()
141 let input = quote! { in test_union()
195 let input = quote! { in test_enum()
357 let input = quote! { in test_attr_with_path()
399 let input = quote! { in test_attr_with_non_mod_style_path()
435 let input = quote! { in test_attr_with_mod_style_path_with_self()
489 let input = quote! { in test_pub_restricted()
548 let input = quote! { in test_vis_crate()
[all …]
Dtest_expr.rs5 use quote::quote;
11 let tokens = quote!(..100u32); in test_expr_parse()
21 let tokens = quote!(..100u32); in test_expr_parse()
35 let tokens = quote!(fut.await); in test_await()
89 quote!(tuple.0.0), in test_tuple_multi_index()
90 quote!(tuple .0.0), in test_tuple_multi_index()
91 quote!(tuple. 0.0), in test_tuple_multi_index()
92 quote!(tuple.0 .0), in test_tuple_multi_index()
93 quote!(tuple.0. 0), in test_tuple_multi_index()
94 quote!(tuple . 0 . 0), in test_tuple_multi_index()
[all …]
Dtest_item.rs5 use quote::quote;
13 TokenTree::Group(Group::new(Delimiter::None, quote! { #[test] })), in test_macro_variable_attr()
53 let tokens = quote! { in test_negative_impl()
66 let tokens = quote! { in test_negative_impl()
78 let tokens = quote! { in test_negative_impl()
111 let tokens = quote! { in test_negative_impl()
127 TokenTree::Group(Group::new(Delimiter::None, quote!(Trait))), in test_macro_variable_impl()
129 TokenTree::Group(Group::new(Delimiter::None, quote!(Type))), in test_macro_variable_impl()
168 let tokens = quote!(trait Trait where {}); in test_supertraits()
180 let tokens = quote!(trait Trait: where {}); in test_supertraits()
[all …]
/external/apache-http/src/org/apache/http/message/
DBasicHeaderValueFormatter.java103 final boolean quote, in formatElements() argument
107 return formatter.formatElements(null, elems, quote).toString(); in formatElements()
114 final boolean quote) { in formatElements() argument
131 formatHeaderElement(buffer, elems[i], quote); in formatElements()
172 boolean quote, in formatHeaderElement() argument
176 return formatter.formatHeaderElement(null, elem, quote).toString(); in formatHeaderElement()
183 final boolean quote) { in formatHeaderElement() argument
200 doFormatValue(buffer, value, quote); in formatHeaderElement()
207 formatNameValuePair(buffer, elem.getParameter(i), quote); in formatHeaderElement()
260 final boolean quote, in formatParameters() argument
[all …]
/external/rust/cxx/macro/src/
Dexpand.rs15 use quote::{format_ident, quote, quote_spanned, ToTokens};
116 expanded.extend(quote! { in expand()
130 quote! { in expand()
151 quote!(#doc #attrs #vis #field) in expand_struct()
165 quote! { in expand_struct()
311 let enum_repr = quote! { in expand_enum()
321 quote! { in expand_enum()
352 quote!(#field: ::std::marker::PhantomData<&#lifetime ()>) in expand_cxx_type()
354 let repr_fields = quote! { in expand_cxx_type()
368 quote! { in expand_cxx_type()
[all …]
Dtype_id.rs3 use quote::{format_ident, quote, ToTokens};
13 Crate::Cxx => tokens.extend(quote!(::cxx)), in to_tokens()
25 ids.push(quote!(())); in expand()
31 quote!(#krate::#t) in expand()
35 quote!(#krate::#t) in expand()
37 _ => quote!([(); #ch as _]), in expand()
42 quote! { (#(#ids,)*) } in expand()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/
DCoerceJDKScalarsTest.java121 _verifyCoerceSuccess(quote("true"), Boolean.TYPE, Boolean.TRUE); in testStringCoercionOkBoolean()
122 _verifyCoerceSuccess(quote("true"), Boolean.class, Boolean.TRUE); in testStringCoercionOkBoolean()
123 _verifyCoerceSuccess(quote("True"), Boolean.TYPE, Boolean.TRUE); in testStringCoercionOkBoolean()
124 _verifyCoerceSuccess(quote("True"), Boolean.class, Boolean.TRUE); in testStringCoercionOkBoolean()
125 _verifyCoerceSuccess(quote("TRUE"), Boolean.TYPE, Boolean.TRUE); in testStringCoercionOkBoolean()
126 _verifyCoerceSuccess(quote("TRUE"), Boolean.class, Boolean.TRUE); in testStringCoercionOkBoolean()
129 _verifyCoerceSuccess(quote("false"), Boolean.TYPE, Boolean.FALSE); in testStringCoercionOkBoolean()
130 _verifyCoerceSuccess(quote("false"), Boolean.class, Boolean.FALSE); in testStringCoercionOkBoolean()
131 _verifyCoerceSuccess(quote("False"), Boolean.TYPE, Boolean.FALSE); in testStringCoercionOkBoolean()
132 _verifyCoerceSuccess(quote("False"), Boolean.class, Boolean.FALSE); in testStringCoercionOkBoolean()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/jdk/
DEnumAliasDeser2352Test.java52 MyEnum2352_1 nonAliased = reader.readValue(quote("A")); in testEnumWithAlias()
54 MyEnum2352_1 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAlias()
56 MyEnum2352_1 multipleAliases1 = reader.readValue(quote("multipleAliases1")); in testEnumWithAlias()
58 MyEnum2352_1 multipleAliases2 = reader.readValue(quote("multipleAliases2")); in testEnumWithAlias()
66 MyEnum2352_2 nonAliased = reader.readValue(quote("a")); in testEnumWithAliasAndToStringSupported()
68 MyEnum2352_2 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAliasAndToStringSupported()
70 MyEnum2352_2 multipleAliases1 = reader.readValue(quote("multipleAliases1")); in testEnumWithAliasAndToStringSupported()
72 MyEnum2352_2 multipleAliases2 = reader.readValue(quote("multipleAliases2")); in testEnumWithAliasAndToStringSupported()
80 MyEnum2352_3 nonAliased = reader.readValue(quote("A")); in testEnumWithAliasAndDefaultForUnknownValueEnabled()
82 MyEnum2352_3 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAliasAndDefaultForUnknownValueEnabled()
[all …]
DJDKStringLikeTypesTest.java86 assertSame(UTF8, MAPPER.readValue(quote("UTF-8"), Charset.class)); in testCharset()
92 assertSame(String.class, mapper.readValue(quote("java.lang.String"), Class.class)); in testClass()
95 assertSame(Boolean.TYPE, mapper.readValue(quote("boolean"), Class.class)); in testClass()
96 assertSame(Byte.TYPE, mapper.readValue(quote("byte"), Class.class)); in testClass()
97 assertSame(Short.TYPE, mapper.readValue(quote("short"), Class.class)); in testClass()
98 assertSame(Character.TYPE, mapper.readValue(quote("char"), Class.class)); in testClass()
99 assertSame(Integer.TYPE, mapper.readValue(quote("int"), Class.class)); in testClass()
100 assertSame(Long.TYPE, mapper.readValue(quote("long"), Class.class)); in testClass()
101 assertSame(Float.TYPE, mapper.readValue(quote("float"), Class.class)); in testClass()
102 assertSame(Double.TYPE, mapper.readValue(quote("double"), Class.class)); in testClass()
[all …]
/external/autotest/client/cros/multimedia/
Darc_resource.py127 pipes.quote(self._MICROPHONE_PACKAGE),
128 pipes.quote(permission)))
133 arc.adb_shell('am start -W %s' % pipes.quote(self._MICROPHONE_ACTIVITY))
143 'am force-stop %s' % pipes.quote(self._MICROPHONE_PACKAGE))
154 arc.adb_cmd('pull %s %s' % (pipes.quote(self._MICROPHONE_RECORD_PATH),
155 pipes.quote(dest_path)))
160 arc.adb_shell('rm %s' % pipes.quote(self._MICROPHONE_RECORD_PATH))
194 arc.adb_cmd('push %s %s' % (pipes.quote(file_path),
195 pipes.quote(dest_path)))
229 pipes.quote(self._PLAYMUSIC_PACKAGE),
[all …]
/external/python/uritemplates/uritemplate/
Dvariable.py156 '{}={}'.format(name, quote(v, safe)) for v in value
159 value = ','.join(quote(v, safe) for v in value)
169 quote(k, safe), quote(v, safe)
175 quote(k, safe), quote(v, safe)
182 return '{}={}'.format(name, quote(value, safe))
203 fragments = [quote(v, safe) for v in value if v is not None]
215 quote(k, safe), quote(v, safe)
221 return quote(value, safe)
240 name, quote(v, safe)
245 value = ','.join(quote(v, safe) for v in value)
[all …]
/external/rust/crates/proc-macro-hack/src/
Dlib.rs153 mod quote; module
245 Ok(quote! { in expand_fake_call_site()
268 Some(_) => quote!(#[macro_export]), in expand_export()
269 None => quote!(), in expand_export()
271 let crate_prefix = vis.as_ref().map(|_| quote!($crate::)); in expand_export()
294 actual_names.extend(quote!(,)); in expand_export()
296 actual_names.extend(quote!(#hacked)); in expand_export()
299 export_dispatch.extend(quote!(,)); in expand_export()
301 export_dispatch.extend(quote!(dispatch as #dispatch)); in expand_export()
304 export_call_site.extend(quote!(,)); in expand_export()
[all …]
/external/rust/crates/pin-project-internal/src/pin_project/
Dderive.rs2 use quote::{format_ident, quote, quote_spanned, ToTokens};
74 tokens.extend(quote! { in into_tokens()
104 quote! { in global_allowed_lints()
121 Some(quote! { in proj_allowed_lints()
129 let proj_mut = quote! { in proj_allowed_lints()
135 let proj_ref = quote! { in proj_allowed_lints()
141 let proj_own = quote! { in proj_allowed_lints()
359 quote!(#proj_where_clause #proj_fields), in parse_struct()
360 quote!(#proj_where_clause #proj_ref_fields), in parse_struct()
361 quote!(#orig_where_clause #proj_own_fields), in parse_struct()
[all …]
/external/rust/crates/serde_derive/src/
Dpretend.rs27 quote! { in pretend_used()
62 Some(quote!(#type_ident::#variant_ident #pat)) in pretend_fields_used()
69 vec![quote!(#type_ident #pat)] in pretend_fields_used()
72 return quote!(); in pretend_fields_used()
76 quote! { in pretend_fields_used()
99 return quote!(); in pretend_variants_used()
116 quote!({ #(#members: #placeholders),* }) in pretend_variants_used()
118 Style::Tuple | Style::Newtype => quote!(( #(#placeholders),* )), in pretend_variants_used()
119 Style::Unit => quote!(), in pretend_variants_used()
122 quote! { in pretend_variants_used()
[all …]
Dde.rs2 use quote::ToTokens;
40 quote! { in expand_derive_deserialize()
54 quote! { in expand_derive_deserialize()
360 Some(path) => quote!(#path), in deserialize_transparent()
370 quote!(#member: __transparent) in deserialize_transparent()
373 attr::Default::Default => quote!(_serde::__private::Default::default()), in deserialize_transparent()
374 attr::Default::Path(path) => quote!(#path()), in deserialize_transparent()
375 attr::Default::None => quote!(_serde::__private::PhantomData), in deserialize_transparent()
377 quote!(#member: #value) in deserialize_transparent()
453 quote!(#local) in deserialize_tuple()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/jdk/
DJDKTypeSerializationTest.java64 assertEquals(quote(escapedAbsPath), str); in testFile()
80 assertEquals(quote("USD"), MAPPER.writeValueAsString(usd)); in testCurrency()
85 assertEquals(quote("en"), MAPPER.writeValueAsString(new Locale("en"))); in testLocale()
86 assertEquals(quote("es_ES"), MAPPER.writeValueAsString(new Locale("es", "ES"))); in testLocale()
87 … assertEquals(quote("fi_FI_savo"), MAPPER.writeValueAsString(new Locale("FI", "fi", "savo"))); in testLocale()
89 assertEquals(quote("en_US"), MAPPER.writeValueAsString(Locale.US)); in testLocale()
92 assertEquals(quote(""), MAPPER.writeValueAsString(Locale.ROOT)); in testLocale()
97 … assertEquals(quote("127.0.0.1"), MAPPER.writeValueAsString(InetAddress.getByName("127.0.0.1"))); in testInetAddress()
99 assertEquals(quote("google.com"), MAPPER.writeValueAsString(input)); in testInetAddress()
105 assertEquals(quote(input.getHostAddress()), json); in testInetAddress()
[all …]
/external/rust/crates/derive_arbitrary/src/
Dlib.rs4 use quote::quote;
31 (quote! { in derive_arbitrary()
73 let arbitrary = construct(fields, |_, _| quote!(arbitrary::Arbitrary::arbitrary(u)?)); in gen_arbitrary_method()
75 quote! { in gen_arbitrary_method()
92 quote!(arbitrary::Arbitrary::arbitrary(u)?) in gen_arbitrary_method()
95 quote! { #idx => #ident::#variant_name #ctor } in gen_arbitrary_method()
101 quote! { #idx => #ident::#variant_name #ctor } in gen_arbitrary_method()
104 quote! { in gen_arbitrary_method()
135 quote! { #name: #ctor } in construct()
137 quote! { { #(#names,)* } } in construct()
[all …]
/external/rust/crates/futures-macro/src/
Dselect.rs5 use quote::{format_ident, quote};
107 Some(quote!(Complete)) in declare_result_enum()
162 future_let_bindings.push(quote! { in select_inner()
180 future_let_bindings.push(quote! { in select_inner()
201 quote! { in select_inner()
222 quote! { in select_inner()
226 quote! { in select_inner()
235 quote! { in select_inner()
239 let branches = quote! { #( #branches )* }; in select_inner()
242 quote! { in select_inner()
[all …]
/external/rust/crates/quote/
DREADME.md4 …badge/github-dtolnay/quote-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">]…
5 …://img.shields.io/crates/v/quote.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](htt…
6quote-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,…
7 ….io/github/workflow/status/dtolnay/quote/CI/master?style=for-the-badge" height="20">](https://gith…
9 This crate provides the [`quote!`] macro for turning Rust syntax tree data
12 [`quote!`]: https://docs.rs/quote/1.0/quote/macro.quote.html
21 Within the `quote!` macro, we can write what looks like code to our text editor
34 quote = "1.0"
38 [*Release notes*](https://github.com/dtolnay/quote/releases)
44 The quote crate provides a [`quote!`] macro within which you can write Rust code
[all …]

12345678910>>...45