| /linux/rust/syn/ |
| H A D | classify.rs | 4 use crate::expr::Expr; 19 pub(crate) fn requires_semi_to_be_stmt(expr: &Expr) -> bool { in requires_semi_to_be_stmt() 21 Expr::Macro(expr) => !expr.mac.delimiter.is_brace(), in requires_semi_to_be_stmt() 27 pub(crate) fn requires_comma_to_be_match_arm(expr: &Expr) -> bool { in requires_comma_to_be_match_arm() 29 Expr::If(_) in requires_comma_to_be_match_arm() 30 | Expr::Match(_) in requires_comma_to_be_match_arm() 31 | Expr::Block(_) | Expr::Unsafe(_) // both under ExprKind::Block in rustc in requires_comma_to_be_match_arm() 32 | Expr::While(_) in requires_comma_to_be_match_arm() 33 | Expr::Loop(_) in requires_comma_to_be_match_arm() 34 | Expr::ForLoop(_) in requires_comma_to_be_match_arm() [all …]
|
| H A D | precedence.rs | 6 use crate::expr::Expr; 93 pub(crate) fn of(e: &Expr) -> Self { in of() 106 Expr::Closure(e) => match e.output { in of() 112 Expr::Break(ExprBreak { expr, .. }) in of() 113 | Expr::Return(ExprReturn { expr, .. }) in of() 114 | Expr::Yield(ExprYield { expr, .. }) => match expr { in of() 119 Expr::Assign(_) => Precedence::Assign, in of() 120 Expr::Range(_) => Precedence::Range, in of() 121 Expr::Binary(e) => Precedence::of_binop(&e.op), in of() 122 Expr::Let(_) => Precedence::Let, in of() [all …]
|
| H A D | fixup.rs | 4 use crate::expr::Expr; 228 expr: &Expr, in leftmost_subexpression_with_operator() argument 262 pub fn leftmost_subexpression_with_dot(self, expr: &Expr) -> (Precedence, Self) { in leftmost_subexpression_with_dot() 287 fn leftmost_subexpression_precedence(self, expr: &Expr) -> Precedence { in leftmost_subexpression_precedence() 313 expr: &Expr, in rightmost_subexpression() argument 352 pub fn rightmost_subexpression_precedence(self, expr: &Expr) -> Precedence { in rightmost_subexpression_precedence() 379 pub fn parenthesize(self, expr: &Expr) -> bool { in parenthesize() 381 || ((self.stmt || self.leftmost_subexpression_in_stmt) && matches!(expr, Expr::Let(_))) in parenthesize() 384 || (self.condition && matches!(expr, Expr::Struct(_))) in parenthesize() 388 Expr::Return(ExprReturn { expr: None, .. }) in parenthesize() [all …]
|
| H A D | stmt.rs | 4 use crate::expr::Expr; 31 Expr(Expr, Option<Token![;]>), 63 pub expr: Box<Expr>, 64 pub diverge: Option<(Token![else], Box<Expr>)>, 87 use crate::expr::{Expr, ExprBlock, ExprMacro}; 157 stmts.push(Stmt::Expr(Expr::Verbatim(TokenStream::new()), semi)); in parse_within() 164 Stmt::Expr(stmt, None) => classify::requires_semi_to_be_stmt(stmt), in parse_within() 168 Stmt::Local(_) | Stmt::Item(_) | Stmt::Expr(_, Some(_)) => false, in parse_within() 302 let expr: Expr = input.parse()?; in stmt_local() 311 Some((else_token, Box::new(Expr::Block(diverge)))) in stmt_local() [all …]
|
| H A D | expr.rs | 114 pub enum Expr { 277 pub elems: Punctuated<Expr, Token![,]>, 286 pub left: Box<Expr>, 288 pub right: Box<Expr>, 308 pub base: Box<Expr>, 319 pub left: Box<Expr>, 321 pub right: Box<Expr>, 343 pub expr: Option<Box<Expr>>, 352 pub func: Box<Expr>, 354 pub args: Punctuated<Expr, Token![,]>, [all …]
|
| H A D | path.rs | 5 use crate::expr::Expr; 186 Const(Expr), 230 pub value: Expr, 290 use crate::expr::{Expr, ExprPath}; 411 pub(crate) fn const_argument(input: ParseStream) -> Result<Expr> { in const_argument() argument 416 return Ok(Expr::Lit(lit)); in const_argument() 421 return Ok(Expr::Path(ExprPath { in const_argument() 432 return Ok(Expr::Block(block)); in const_argument() 440 content.parse::<Expr>()?; in const_argument() 442 return Ok(Expr::Verbatim(verbatim)); in const_argument() [all …]
|
| H A D | data.rs | 4 use crate::expr::{Expr, Index, Member}; 24 pub discriminant: Option<(Token![=], Expr)>, 246 use crate::expr::Expr; 275 let discriminant: Expr = input.parse()?; in parse() 280 let mut discriminant: Result<Expr> = ahead.parse(); in parse() 284 discriminant = Ok(Expr::Verbatim(verbatim::between(&begin, input))); in parse()
|
| H A D | pat.rs | 245 Expr, ExprConst, ExprLit, ExprMacro, ExprPath, ExprRange, Member, RangeLimits, 614 start: Some(Box::new(Expr::Path(ExprPath { in pat_range() 711 fn into_expr(self) -> Box<Expr> { in into_expr() argument 713 PatRangeBound::Const(pat) => Expr::Const(pat), in into_expr() 714 PatRangeBound::Lit(pat) => Expr::Lit(pat), in into_expr() 715 PatRangeBound::Path(pat) => Expr::Path(pat), in into_expr() 886 path::printing::print_qpath(tokens, &self.qself, &self.path, PathStyle::Expr); in to_tokens() 921 path::printing::print_qpath(tokens, &self.qself, &self.path, PathStyle::Expr); in to_tokens()
|
| H A D | attr.rs | 7 use crate::expr::Expr; 502 pub value: Expr, 652 use crate::expr::{Expr, ExprLit}; 748 Expr::Lit(ExprLit { in parse_meta_name_value_after_path()
|
| H A D | generics.rs | 4 use crate::expr::Expr; 92 pub default: Option<Expr>, 1146 use crate::expr::Expr; 1450 pub(crate) fn print_const_argument(expr: &Expr, tokens: &mut TokenStream) { in print_const_argument() argument 1452 Expr::Lit(expr) => expr.to_tokens(tokens), in print_const_argument() 1454 Expr::Path(expr) in print_const_argument() 1463 Expr::Block(expr) => expr.to_tokens(tokens), in print_const_argument() 1466 Expr::Verbatim(expr) => expr.to_tokens(tokens), in print_const_argument()
|
| H A D | scan_expr.rs | 6 use syn::{AngleBracketedGenericArguments, BinOp, Expr, ExprPath, Lifetime, Lit, Token, Type}; 252 Input::CanBeginExpr => Expr::peek(input), in scan_expr()
|
| H A D | item.rs | 6 use crate::expr::Expr; 115 pub expr: Box<Expr>, 228 pub expr: Box<Expr>, 649 pub default: Option<(Token![=], Expr)>, 749 pub expr: Expr, 912 use crate::expr::Expr; 998 input.parse::<Expr>()?; in parse_rest_of_item() 1035 let expr: Expr = input.parse()?; in parse_rest_of_item() 1477 let expr: Expr = input.parse()?; in parse() 1894 input.parse::<Expr>()?; in parse() [all …]
|
| H A D | lib.rs | 377 Expr, ExprBinary, ExprCall, ExprCast, ExprField, ExprIndex, ExprLit, ExprMacro, ExprMethodCall,
|
| H A D | ty.rs | 4 use crate::expr::Expr; 101 pub len: Expr,
|
| /linux/rust/syn/gen/ |
| H A D | clone.rs | 241 impl Clone for crate::Expr { implementation 245 crate::Expr::Array(v0) => crate::Expr::Array(v0.clone()), in clone() 247 crate::Expr::Assign(v0) => crate::Expr::Assign(v0.clone()), in clone() 249 crate::Expr::Async(v0) => crate::Expr::Async(v0.clone()), in clone() 251 crate::Expr::Await(v0) => crate::Expr::Await(v0.clone()), in clone() 252 crate::Expr::Binary(v0) => crate::Expr::Binary(v0.clone()), in clone() 254 crate::Expr::Block(v0) => crate::Expr::Block(v0.clone()), in clone() 256 crate::Expr::Break(v0) => crate::Expr::Break(v0.clone()), in clone() 257 crate::Expr::Call(v0) => crate::Expr::Call(v0.clone()), in clone() 258 crate::Expr::Cast(v0) => crate::Expr::Cast(v0.clone()), in clone() [all …]
|
| H A D | eq.rs | 264 impl Eq for crate::Expr {} implementation 267 impl PartialEq for crate::Expr { implementation 271 (crate::Expr::Array(self0), crate::Expr::Array(other0)) => self0 == other0, in eq() 273 (crate::Expr::Assign(self0), crate::Expr::Assign(other0)) => self0 == other0, in eq() 275 (crate::Expr::Async(self0), crate::Expr::Async(other0)) => self0 == other0, in eq() 277 (crate::Expr::Await(self0), crate::Expr::Await(other0)) => self0 == other0, in eq() 278 (crate::Expr::Binary(self0), crate::Expr::Binary(other0)) => self0 == other0, in eq() 280 (crate::Expr::Block(self0), crate::Expr::Block(other0)) => self0 == other0, in eq() 282 (crate::Expr::Break(self0), crate::Expr::Break(other0)) => self0 == other0, in eq() 283 (crate::Expr::Call(self0), crate::Expr::Call(other0)) => self0 == other0, in eq() [all …]
|
| H A D | fold.rs | 143 fn fold_expr(&mut self, i: crate::Expr) -> crate::Expr { in fold_expr() argument 1323 pub fn fold_expr<F>(f: &mut F, node: crate::Expr) -> crate::Expr in fold_expr() 1328 crate::Expr::Array(_binding_0) => { in fold_expr() 1329 crate::Expr::Array(full!(f.fold_expr_array(_binding_0))) in fold_expr() 1331 crate::Expr::Assign(_binding_0) => { in fold_expr() 1332 crate::Expr::Assign(full!(f.fold_expr_assign(_binding_0))) in fold_expr() 1334 crate::Expr::Async(_binding_0) => { in fold_expr() 1335 crate::Expr::Async(full!(f.fold_expr_async(_binding_0))) in fold_expr() 1337 crate::Expr::Await(_binding_0) => { in fold_expr() 1338 crate::Expr::Await(full!(f.fold_expr_await(_binding_0))) in fold_expr() [all …]
|
| H A D | hash.rs | 350 impl Hash for crate::Expr { implementation 357 crate::Expr::Array(v0) => { in hash() 362 crate::Expr::Assign(v0) => { in hash() 367 crate::Expr::Async(v0) => { in hash() 372 crate::Expr::Await(v0) => { in hash() 376 crate::Expr::Binary(v0) => { in hash() 381 crate::Expr::Block(v0) => { in hash() 386 crate::Expr::Break(v0) => { in hash() 390 crate::Expr::Call(v0) => { in hash() 394 crate::Expr::Cast(v0) => { in hash() [all …]
|
| H A D | debug.rs | 418 impl Debug for crate::Expr { implementation 423 crate::Expr::Array(v0) => v0.debug(formatter, "Array"), in fmt() 425 crate::Expr::Assign(v0) => v0.debug(formatter, "Assign"), in fmt() 427 crate::Expr::Async(v0) => v0.debug(formatter, "Async"), in fmt() 429 crate::Expr::Await(v0) => v0.debug(formatter, "Await"), in fmt() 430 crate::Expr::Binary(v0) => v0.debug(formatter, "Binary"), in fmt() 432 crate::Expr::Block(v0) => v0.debug(formatter, "Block"), in fmt() 434 crate::Expr::Break(v0) => v0.debug(formatter, "Break"), in fmt() 435 crate::Expr::Call(v0) => v0.debug(formatter, "Call"), in fmt() 436 crate::Expr::Cast(v0) => v0.debug(formatter, "Cast"), in fmt() [all …]
|
| H A D | visit_mut.rs | 144 fn visit_expr_mut(&mut self, i: &mut crate::Expr) { in visit_expr_mut() argument 1306 pub fn visit_expr_mut<V>(v: &mut V, node: &mut crate::Expr) in visit_expr_mut() 1311 crate::Expr::Array(_binding_0) => { in visit_expr_mut() 1314 crate::Expr::Assign(_binding_0) => { in visit_expr_mut() 1317 crate::Expr::Async(_binding_0) => { in visit_expr_mut() 1320 crate::Expr::Await(_binding_0) => { in visit_expr_mut() 1323 crate::Expr::Binary(_binding_0) => { in visit_expr_mut() 1326 crate::Expr::Block(_binding_0) => { in visit_expr_mut() 1329 crate::Expr::Break(_binding_0) => { in visit_expr_mut() 1332 crate::Expr::Call(_binding_0) => { in visit_expr_mut() [all …]
|
| H A D | visit.rs | 136 fn visit_expr(&mut self, i: &'ast crate::Expr) { in visit_expr() argument 1308 pub fn visit_expr<'ast, V>(v: &mut V, node: &'ast crate::Expr) in visit_expr() 1313 crate::Expr::Array(_binding_0) => { in visit_expr() 1316 crate::Expr::Assign(_binding_0) => { in visit_expr() 1319 crate::Expr::Async(_binding_0) => { in visit_expr() 1322 crate::Expr::Await(_binding_0) => { in visit_expr() 1325 crate::Expr::Binary(_binding_0) => { in visit_expr() 1328 crate::Expr::Block(_binding_0) => { in visit_expr() 1331 crate::Expr::Break(_binding_0) => { in visit_expr() 1334 crate::Expr::Call(_binding_0) => { in visit_expr() [all …]
|