Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 87) sorted by relevance

1234

/linux/rust/quote/
H A Dlib.rs822 ($tokens:ident $($tts:tt)*) => {
823 $crate::quote_tokens_with_context!{$tokens
839 ($tokens:ident $span:ident $($tts:tt)*) => {
840 $crate::quote_tokens_with_context_spanned!{$tokens $span
856 ($tokens:ident
862 $crate::quote_token_with_context!{$tokens $b3 $b2 $b1 $curr $a1 $a2 $a3}
871 ($tokens:ident $span:ident
877 $crate::quote_token_with_context_spanned!{$tokens $span $b3 $b2 $b1 $curr $a1 $a2 $a3}
888 ($tokens:ident $b3:tt $b2:tt $b1:tt @ $a1:tt $a2:tt $a3:tt) => {};
891 ($tokens:ident $b3:tt $b2:tt $b1:tt (#) ( $($inner:tt)* ) * $a3:tt) => {{
[all …]
H A Dto_tokens.rs52 fn to_tokens(&self, tokens: &mut TokenStream); in to_tokens()
59 let mut tokens = TokenStream::new(); in to_token_stream() localVariable
60 self.to_tokens(&mut tokens); in to_token_stream()
61 tokens in to_token_stream()
77 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
78 (**self).to_tokens(tokens); in to_tokens()
83 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
84 (**self).to_tokens(tokens); in to_tokens()
89 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
90 (**self).to_tokens(tokens); in to_tokens()
[all …]
H A Druntime.rs189 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
190 self.0.to_tokens(tokens); in to_tokens()
252 pub fn push_group(tokens: &mut TokenStream, delimiter: Delimiter, inner: TokenStream) { in push_group()
253 tokens.append(Group::new(delimiter, inner)); in push_group()
258 tokens: &mut TokenStream, in push_group_spanned()
265 tokens.append(g); in push_group_spanned()
269 pub fn parse(tokens: &mut TokenStream, s: &str) { in parse()
271 tokens.extend(iter::once(s)); in parse()
275 pub fn parse_spanned(tokens: &mut TokenStream, span: Span, s: &str) { in parse_spanned()
277 tokens.extend(s.into_iter().map(|t| respan_token_tree(t, span))); in parse_spanned()
[all …]
/linux/rust/syn/
H A Ditem.rs1248 let (delimiter, tokens) = input.call(mac::parse_delimiter)?; in parse()
1261 tokens, in parse()
2955 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
2956 tokens.append_all(self.attrs.outer()); in to_tokens()
2957 self.vis.to_tokens(tokens); in to_tokens()
2958 self.extern_token.to_tokens(tokens); in to_tokens()
2959 self.crate_token.to_tokens(tokens); in to_tokens()
2960 self.ident.to_tokens(tokens); in to_tokens()
2962 as_token.to_tokens(tokens); in to_tokens()
2963 rename.to_tokens(tokens); in to_tokens()
[all …]
H A Dop.rs177 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
179 BinOp::Add(t) => t.to_tokens(tokens), in to_tokens()
180 BinOp::Sub(t) => t.to_tokens(tokens), in to_tokens()
181 BinOp::Mul(t) => t.to_tokens(tokens), in to_tokens()
182 BinOp::Div(t) => t.to_tokens(tokens), in to_tokens()
183 BinOp::Rem(t) => t.to_tokens(tokens), in to_tokens()
184 BinOp::And(t) => t.to_tokens(tokens), in to_tokens()
185 BinOp::Or(t) => t.to_tokens(tokens), in to_tokens()
186 BinOp::BitXor(t) => t.to_tokens(tokens), in to_tokens()
187 BinOp::BitAnd(t) => t.to_tokens(tokens), in to_tokens()
[all …]
H A Dexpr.rs1602 if let Expr::Verbatim(tokens) = &mut e { in trailer_expr()
1603 *tokens = verbatim::between(&begin, input); in trailer_expr()
1970 let (delimiter, tokens) = mac::parse_delimiter(input)?; in rest_of_path_or_macro_or_struct()
1977 tokens, in rest_of_path_or_macro_or_struct()
3153 pub(crate) fn outer_attrs_to_tokens(attrs: &[Attribute], tokens: &mut TokenStream) { in outer_attrs_to_tokens()
3154 tokens.append_all(attrs.outer()); in outer_attrs_to_tokens()
3158 fn inner_attrs_to_tokens(attrs: &[Attribute], tokens: &mut TokenStream) { in inner_attrs_to_tokens()
3159 tokens.append_all(attrs.inner()); in inner_attrs_to_tokens()
3168 tokens: &mut TokenStream, in print_subexpression()
3186 let do_print_expr = |tokens: &mut TokenStream| print_expr(expr, tokens, fixup); in print_subexpression()
[all …]
H A Dpath.rs733 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
734 print_path(tokens, self, PathStyle::AsWritten); in to_tokens()
738 pub(crate) fn print_path(tokens: &mut TokenStream, path: &Path, style: PathStyle) { in print_path()
739 path.leading_colon.to_tokens(tokens); in print_path()
741 print_path_segment(tokens, segment.value(), style); in print_path()
742 segment.punct().to_tokens(tokens); in print_path()
748 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
749 print_path_segment(tokens, self, PathStyle::AsWritten); in to_tokens()
753 fn print_path_segment(tokens: &mut TokenStream, segment: &PathSegment, style: PathStyle) { in print_path_segment()
754 segment.ident.to_tokens(tokens); in print_path_segment()
[all …]
H A Dgenerics.rs1163 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
1168 TokensOrDefault(&self.lt_token).to_tokens(tokens); in to_tokens()
1175 param.to_tokens(tokens); in to_tokens()
1183 <Token![,]>::default().to_tokens(tokens); in to_tokens()
1186 param.to_tokens(tokens); in to_tokens()
1192 TokensOrDefault(&self.gt_token).to_tokens(tokens); in to_tokens()
1197 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
1202 TokensOrDefault(&self.0.lt_token).to_tokens(tokens); in to_tokens()
1209 param.to_tokens(tokens); in to_tokens()
1218 <Token![,]>::default().to_tokens(tokens); in to_tokens()
[all …]
H A Dpat.rs431 let (delimiter, tokens) = mac::parse_delimiter(input)?; in pat_path_or_macro_or_struct_or_range()
438 tokens, in pat_path_or_macro_or_struct_or_range()
823 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
824 tokens.append_all(self.attrs.outer()); in to_tokens()
825 self.by_ref.to_tokens(tokens); in to_tokens()
826 self.mutability.to_tokens(tokens); in to_tokens()
827 self.ident.to_tokens(tokens); in to_tokens()
829 at_token.to_tokens(tokens); in to_tokens()
830 subpat.to_tokens(tokens); in to_tokens()
837 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
[all …]
H A Dty.rs524 let (delimiter, tokens) = mac::parse_delimiter(input)?; in ambig_ty()
530 tokens, in ambig_ty()
1089 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
1090 self.bracket_token.surround(tokens, |tokens| { in to_tokens()
1091 self.elem.to_tokens(tokens); in to_tokens()
1098 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
1099 self.bracket_token.surround(tokens, |tokens| { in to_tokens()
1100 self.elem.to_tokens(tokens); in to_tokens()
1101 self.semi_token.to_tokens(tokens); in to_tokens()
1102 self.len.to_tokens(tokens); in to_tokens()
[all …]
H A Dderive.rs220 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
222 attr.to_tokens(tokens); in to_tokens()
224 self.vis.to_tokens(tokens); in to_tokens()
226 Data::Struct(d) => d.struct_token.to_tokens(tokens), in to_tokens()
227 Data::Enum(d) => d.enum_token.to_tokens(tokens), in to_tokens()
228 Data::Union(d) => d.union_token.to_tokens(tokens), in to_tokens()
230 self.ident.to_tokens(tokens); in to_tokens()
231 self.generics.to_tokens(tokens); in to_tokens()
235 self.generics.where_clause.to_tokens(tokens); in to_tokens()
236 fields.to_tokens(tokens); in to_tokens()
[all …]
H A Dstmt.rs270 let (delimiter, tokens) = mac::parse_delimiter(input)?; in stmt_mac()
279 tokens, in stmt_mac()
428 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
429 self.brace_token.surround(tokens, |tokens| { in to_tokens()
430 tokens.append_all(&self.stmts); in to_tokens()
437 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
439 Stmt::Local(local) => local.to_tokens(tokens), in to_tokens()
440 Stmt::Item(item) => item.to_tokens(tokens), in to_tokens()
442 expr::printing::print_expr(expr, tokens, FixupContext::new_stmt()); in to_tokens()
443 semi.to_tokens(tokens); in to_tokens()
[all …]
H A Dmac.rs23 pub tokens: TokenStream,
150 crate::parse::parse_scoped(parser, scope, self.tokens.clone()) in parse_body_with()
184 let tokens; in parse() localVariable
190 tokens = content; in parse()
193 tokens, in parse()
209 pub(crate) fn surround(&self, tokens: &mut TokenStream, inner: TokenStream) { in surround()
215 token::printing::delim(delim, span.join(), tokens, inner); in surround()
221 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
222 path::printing::print_path(tokens, &self.path, PathStyle::Mod); in to_tokens()
223 self.bang_token.to_tokens(tokens); in to_tokens()
[all …]
H A Ddata.rs385 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
386 tokens.append_all(&self.attrs); in to_tokens()
387 self.ident.to_tokens(tokens); in to_tokens()
388 self.fields.to_tokens(tokens); in to_tokens()
390 eq_token.to_tokens(tokens); in to_tokens()
391 disc.to_tokens(tokens); in to_tokens()
398 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
399 self.brace_token.surround(tokens, |tokens| { in to_tokens()
400 self.named.to_tokens(tokens); in to_tokens()
407 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
[all …]
H A Drestriction.rs159 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
161 Visibility::Public(pub_token) => pub_token.to_tokens(tokens), in to_tokens()
162 Visibility::Restricted(vis_restricted) => vis_restricted.to_tokens(tokens), in to_tokens()
170 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
171 self.pub_token.to_tokens(tokens); in to_tokens()
172 self.paren_token.surround(tokens, |tokens| { in to_tokens()
175 self.in_token.to_tokens(tokens); in to_tokens()
176 path::printing::print_path(tokens, &self.path, PathStyle::Mod); in to_tokens()
H A Dattr.rs492 pub tokens: TokenStream,
581 crate::parse::parse_scoped(parser, scope, self.tokens.clone()) in parse_args_with()
734 let (delimiter, tokens) = mac::parse_delimiter(input)?; in parse_meta_list_after_path()
738 tokens, in parse_meta_list_after_path()
800 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
801 self.pound_token.to_tokens(tokens); in to_tokens()
803 b.to_tokens(tokens); in to_tokens()
805 self.bracket_token.surround(tokens, |tokens| { in to_tokens()
806 self.meta.to_tokens(tokens); in to_tokens()
813 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
[all …]
H A Dmacros.rs68 generate_to_tokens!(() tokens $name $body);
104 ($($arms:tt)*) $tokens:ident $name:ident {
113 $tokens $name { $($next)* }
118 ($($arms:tt)*) $tokens:ident $name:ident {
126 ($($arms)* $(#[cfg $cfg_attr])* $name::$variant(_e) => _e.to_tokens($tokens),)
127 $tokens $name { $($next)* }
131 (($($arms:tt)*) $tokens:ident $name:ident {}) => {
134 fn to_tokens(&self, $tokens: &mut ::proc_macro2::TokenStream) {
H A Dparse.rs1248 fn parse2(self, tokens: TokenStream) -> Result<Self::Output>; in parse2()
1256 fn parse(self, tokens: proc_macro::TokenStream) -> Result<Self::Output> { in parse()
1257 self.parse2(proc_macro2::TokenStream::from(tokens)) in parse()
1275 fn __parse_scoped(self, scope: Span, tokens: TokenStream) -> Result<Self::Output> { in __parse_scoped()
1277 self.parse2(tokens) in __parse_scoped()
1281 fn tokens_to_parse_buffer(tokens: &TokenBuffer) -> ParseBuffer { in tokens_to_parse_buffer()
1283 let cursor = tokens.begin(); in tokens_to_parse_buffer()
1294 fn parse2(self, tokens: TokenStream) -> Result<T> { in parse2()
1295 let buf = TokenBuffer::new2(tokens); in parse2()
1308 fn __parse_scoped(self, scope: Span, tokens: TokenStream) -> Result<Self::Output> { in __parse_scoped()
[all …]
/linux/rust/macros/
H A Dpaste.rs5 fn concat_helper(tokens: &[TokenTree]) -> Vec<(String, Span)> { in concat_helper()
6 let mut tokens = tokens.iter(); in concat_helper() localVariable
10 match tokens.next() { in concat_helper()
29 let Some(TokenTree::Ident(ident)) = tokens.next() else { in concat_helper()
50 let tokens = group.stream().into_iter().collect::<Vec<TokenTree>>(); in concat_helper() localVariable
51 segments.append(&mut concat_helper(tokens.as_slice())); in concat_helper()
60 fn concat(tokens: &[TokenTree], group_span: Span) -> TokenTree { in concat()
61 let segments = concat_helper(tokens); in concat()
66 pub(crate) fn expand(tokens: &mut Vec<TokenTree>) { in expand()
67 for token in tokens.iter_mut() { in expand()
[all …]
H A Dquote.rs6 fn to_tokens(&self, tokens: &mut TokenStream); in to_tokens()
10 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
12 v.to_tokens(tokens); in to_tokens()
18 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
19 tokens.extend([TokenTree::from(self.clone())]); in to_tokens()
24 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
25 tokens.extend([TokenTree::from(self.clone())]); in to_tokens()
30 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
31 tokens.extend([self.clone()]); in to_tokens()
36 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
[all …]
H A Dvtable.rs8 let mut tokens: Vec<_> = ts.into_iter().collect(); in vtable() localVariable
11 let is_trait = tokens in vtable()
24 let body = match tokens.pop() { in vtable()
94 tokens.push(TokenTree::Group(Group::new(Delimiter::Brace, new_body))); in vtable()
95 tokens.into_iter().collect() in vtable()
/linux/scripts/
H A Dasn1_compiler.c348 struct token *tokens; in tokenise() local
355 token_list = tokens = calloc((end - buffer) / 2, sizeof(struct token)); in tokenise()
356 if (!tokens) { in tokenise()
407 tokens[tix].line = lineno; in tokenise()
420 tokens[tix].size = q - p; in tokenise()
423 tokens[tix].content = malloc(tokens[tix].size + 1); in tokenise()
424 if (!tokens[tix].content) { in tokenise()
428 memcpy(tokens[tix].content, start, tokens[tix].size); in tokenise()
429 tokens[tix].content[tokens[tix].size] = 0; in tokenise()
434 if (islower(tokens[tix].content[0])) { in tokenise()
[all …]
/linux/net/netfilter/
H A Dnft_limit.c20 u64 tokens; member
34 u64 now, tokens; in nft_limit_eval() local
39 tokens = priv->limit->tokens + now - priv->limit->last; in nft_limit_eval()
40 if (tokens > priv->tokens_max) in nft_limit_eval()
41 tokens = priv->tokens_max; in nft_limit_eval()
44 delta = tokens - cost; in nft_limit_eval()
46 priv->limit->tokens = delta; in nft_limit_eval()
50 priv->limit->tokens = tokens; in nft_limit_eval()
61 u64 unit, tokens, rate_with_burst; in nft_limit_init() local
88 if (check_mul_overflow(tmp, priv->burst, &tokens)) in nft_limit_init()
[all …]
/linux/drivers/net/wireguard/
H A Dratelimiter.c27 u64 last_time_ns, tokens, ip; member
113 u64 now, tokens; in wg_ratelimiter_allow() local
122 tokens = min_t(u64, TOKEN_MAX, in wg_ratelimiter_allow()
123 entry->tokens + now - in wg_ratelimiter_allow()
126 ret = tokens >= PACKET_COST; in wg_ratelimiter_allow()
127 entry->tokens = ret ? tokens - PACKET_COST : tokens; in wg_ratelimiter_allow()
147 entry->tokens = TOKEN_MAX - PACKET_COST; in wg_ratelimiter_allow()
/linux/sound/soc/sof/
H A Dtopology.c17 #include <uapi/sound/sof/tokens.h>
44 * sof_update_ipc_object - Parse multiple sets of tokens within the token array associated with the
63 const struct sof_topology_token *tokens; in sof_update_ipc_object() local
76 /* No tokens to match */ in sof_update_ipc_object()
80 tokens = token_list[token_id].tokens; in sof_update_ipc_object()
81 if (!tokens) { in sof_update_ipc_object()
82 dev_err(scomp->dev, "Invalid tokens for token id: %d\n", token_id); in sof_update_ipc_object()
91 if (tokens[i].token == tuples[j].token) { in sof_update_ipc_object()
92 switch (tokens[ in sof_update_ipc_object()
458 sof_parse_uuid_tokens(struct snd_soc_component * scomp,void * object,size_t offset,const struct sof_topology_token * tokens,int num_tokens,struct snd_soc_tplg_vendor_array * array) sof_parse_uuid_tokens() argument
510 const struct sof_topology_token *tokens; sof_copy_tuples() local
629 sof_parse_string_tokens(struct snd_soc_component * scomp,void * object,int offset,const struct sof_topology_token * tokens,int num_tokens,struct snd_soc_tplg_vendor_array * array) sof_parse_string_tokens() argument
675 sof_parse_word_tokens(struct snd_soc_component * scomp,void * object,int offset,const struct sof_topology_token * tokens,int num_tokens,struct snd_soc_tplg_vendor_array * array) sof_parse_word_tokens() argument
725 sof_parse_token_sets(struct snd_soc_component * scomp,void * object,const struct sof_topology_token * tokens,int count,struct snd_soc_tplg_vendor_array * array,int array_size,int token_instance_num,size_t object_size) sof_parse_token_sets() argument
811 sof_parse_tokens(struct snd_soc_component * scomp,void * object,const struct sof_topology_token * tokens,int num_tokens,struct snd_soc_tplg_vendor_array * array,int array_size) sof_parse_tokens() argument
[all...]

1234