Home
last modified time | relevance | path

Searched refs:let_stmt (Results 1 – 25 of 41) sorted by relevance

12

/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_assists/src/handlers/
H A Dinline_local_variable.rs38 let InlineData { let_stmt, delete_let, references, target } = in inline_local_variable()
40 inline_let(&ctx.sema, let_stmt, range, file_id) in inline_local_variable()
46 let initializer_expr = let_stmt.initializer()?; in inline_local_variable()
49 if let Some(whitespace) = let_stmt in inline_local_variable()
56 let_stmt.syntax().text_range().start(), in inline_local_variable()
60 let_stmt.syntax().text_range() in inline_local_variable()
146 let_stmt: ast::LetStmt, field
154 let_stmt: ast::LetStmt, in inline_let()
158 let bind_pat = match let_stmt.pat()? { in inline_let()
175 let_stmt, in inline_let()
[all …]
H A Dreplace_let_with_if_let.rs41 let let_stmt = let_kw.parent().and_then(ast::LetStmt::cast)?; in replace_let_with_if_let() localVariable
42 let init = let_stmt.initializer()?; in replace_let_with_if_let()
43 let original_pat = let_stmt.pat()?; in replace_let_with_if_let()
64 make::ext::empty_block_expr().indent(IndentLevel::from_node(let_stmt.syntax())); in replace_let_with_if_let()
68 edit.replace_ast(ast::Stmt::from(let_stmt), ast::Stmt::from(stmt)); in replace_let_with_if_let()
H A Dreplace_turbofish_with_explicit_type.rs33 let let_stmt = ctx.find_node_at_offset::<LetStmt>()?; in replace_turbofish_with_explicit_type() localVariable
35 let initializer = let_stmt.initializer()?; in replace_turbofish_with_explicit_type()
76 if let None = let_stmt.colon_token() { in replace_turbofish_with_explicit_type()
79 let ident_range = let_stmt.pat()?.syntax().text_range(); in replace_turbofish_with_explicit_type()
90 } else if let Some(InferType(t)) = let_stmt.ty() { in replace_turbofish_with_explicit_type()
H A Dadd_turbo_fish.rs56 if let Some(let_stmt) = ctx.find_node_at_offset::<ast::LetStmt>() { in add_turbo_fish()
57 if let_stmt.colon_token().is_none() { in add_turbo_fish()
58 let type_pos = let_stmt.pat()?.syntax().last_token()?.text_range().end(); in add_turbo_fish()
59 let semi_pos = let_stmt.syntax().last_token()?.text_range().end(); in add_turbo_fish()
66 if let_stmt.semicolon_token().is_none() { in add_turbo_fish()
H A Dadd_explicit_type.rs23 let (ascribed_ty, expr, pat) = if let Some(let_stmt) = ctx.find_node_at_offset::<LetStmt>() { in add_explicit_type()
25 let eq_range = let_stmt.eq_token()?.text_range(); in add_explicit_type()
33 (let_stmt.ty(), let_stmt.initializer(), let_stmt.pat()?) in add_explicit_type()
H A Dconvert_to_guarded_return.rs152 let let_stmt = make::let_stmt(bound_ident, None, Some(match_expr)); in convert_to_guarded_return() localVariable
153 let let_stmt = let_stmt.indent(if_indent_level); in convert_to_guarded_return() localVariable
154 let_stmt.syntax().clone_for_update() in convert_to_guarded_return()
H A Dpromote_local_to_const.rs54 let let_stmt = pat.syntax().parent().and_then(ast::LetStmt::cast)?; in promote_local_to_const() localVariable
66 let initializer = let_stmt.initializer()?; in promote_local_to_const()
71 let target = let_stmt.syntax().text_range(); in promote_local_to_const()
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_assists/src/handlers/
H A Dinline_local_variable.rs38 let InlineData { let_stmt, delete_let, references, target } = in inline_local_variable()
40 inline_let(&ctx.sema, let_stmt, range, file_id) in inline_local_variable()
46 let initializer_expr = let_stmt.initializer()?; in inline_local_variable()
49 if let Some(whitespace) = let_stmt in inline_local_variable()
56 let_stmt.syntax().text_range().start(), in inline_local_variable()
60 let_stmt.syntax().text_range() in inline_local_variable()
146 let_stmt: ast::LetStmt, field
154 let_stmt: ast::LetStmt, in inline_let()
158 let bind_pat = match let_stmt.pat()? { in inline_let()
175 let_stmt, in inline_let()
[all …]
H A Dreplace_let_with_if_let.rs41 let let_stmt = let_kw.parent().and_then(ast::LetStmt::cast)?; in replace_let_with_if_let() localVariable
42 let init = let_stmt.initializer()?; in replace_let_with_if_let()
43 let original_pat = let_stmt.pat()?; in replace_let_with_if_let()
64 make::ext::empty_block_expr().indent(IndentLevel::from_node(let_stmt.syntax())); in replace_let_with_if_let()
68 edit.replace_ast(ast::Stmt::from(let_stmt), ast::Stmt::from(stmt)); in replace_let_with_if_let()
H A Dreplace_turbofish_with_explicit_type.rs33 let let_stmt = ctx.find_node_at_offset::<LetStmt>()?; in replace_turbofish_with_explicit_type() localVariable
35 let initializer = let_stmt.initializer()?; in replace_turbofish_with_explicit_type()
76 if let None = let_stmt.colon_token() { in replace_turbofish_with_explicit_type()
79 let ident_range = let_stmt.pat()?.syntax().text_range(); in replace_turbofish_with_explicit_type()
90 } else if let Some(InferType(t)) = let_stmt.ty() { in replace_turbofish_with_explicit_type()
H A Dadd_explicit_type.rs23 let (ascribed_ty, expr, pat) = if let Some(let_stmt) = ctx.find_node_at_offset::<LetStmt>() { in add_explicit_type()
25 let eq_range = let_stmt.eq_token()?.text_range(); in add_explicit_type()
33 (let_stmt.ty(), let_stmt.initializer(), let_stmt.pat()?) in add_explicit_type()
H A Dadd_turbo_fish.rs56 if let Some(let_stmt) = ctx.find_node_at_offset::<ast::LetStmt>() { in add_turbo_fish()
57 if let_stmt.colon_token().is_none() { in add_turbo_fish()
58 let type_pos = let_stmt.pat()?.syntax().last_token()?.text_range().end(); in add_turbo_fish()
59 let semi_pos = let_stmt.syntax().last_token()?.text_range().end(); in add_turbo_fish()
66 if let_stmt.semicolon_token().is_none() { in add_turbo_fish()
H A Dconvert_to_guarded_return.rs152 let let_stmt = make::let_stmt(bound_ident, None, Some(match_expr)); in convert_to_guarded_return() localVariable
153 let let_stmt = let_stmt.indent(if_indent_level); in convert_to_guarded_return() localVariable
154 let_stmt.syntax().clone_for_update() in convert_to_guarded_return()
H A Dpromote_local_to_const.rs54 let let_stmt = pat.syntax().parent().and_then(ast::LetStmt::cast)?; in promote_local_to_const() localVariable
66 let initializer = let_stmt.initializer()?; in promote_local_to_const()
71 let target = let_stmt.syntax().text_range(); in promote_local_to_const()
/dports/lang/tcbasic/tcbasic-2.2.0/
H A Dstatement.c70 s->u.let_stmt.var = (struct var *) arg1; in new_statement()
71 s->u.let_stmt.expression = (struct expression *) arg2; in new_statement()
286 n = eval_expression(s->u.let_stmt.expression); in eval_statement()
287 runtime_set_var(s->u.let_stmt.var->value, n); in eval_statement()
349 print_var(s->u.let_stmt.var); in print_statement()
351 print_expression(s->u.let_stmt.expression); in print_statement()
405 free_var(s->u.let_stmt.var); in free_statement()
406 s->u.let_stmt.var = NULL; in free_statement()
407 free_expression(s->u.let_stmt.expression); in free_statement()
408 s->u.let_stmt.expression = NULL; in free_statement()
H A Dstatement.h50 } let_stmt; member
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide/src/
H A Dtyping.rs171 let let_stmt: ast::LetStmt = find_node_at_offset(file.syntax(), offset)?; in on_eq_typed() localVariable
172 if let_stmt.semicolon_token().is_some() { in on_eq_typed()
175 if let Some(expr) = let_stmt.initializer() { in on_eq_typed()
186 let offset = let_stmt.syntax().text_range().end(); in on_eq_typed()
H A Djoin_lines.rs245 let let_stmt = ast::LetStmt::cast(prev.as_node()?.clone())?; in join_assignments() localVariable
246 if let_stmt.eq_token().is_some() { in join_assignments()
250 let let_ident_pat = match let_stmt.pat()? { in join_assignments()
271 edit.delete(let_stmt.semicolon_token()?.text_range().cover(lhs.syntax().text_range())); in join_assignments()
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide/src/
H A Dtyping.rs171 let let_stmt: ast::LetStmt = find_node_at_offset(file.syntax(), offset)?; in on_eq_typed() localVariable
172 if let_stmt.semicolon_token().is_some() { in on_eq_typed()
175 if let Some(expr) = let_stmt.initializer() { in on_eq_typed()
186 let offset = let_stmt.syntax().text_range().end(); in on_eq_typed()
H A Djoin_lines.rs245 let let_stmt = ast::LetStmt::cast(prev.as_node()?.clone())?; in join_assignments() localVariable
246 if let_stmt.eq_token().is_some() { in join_assignments()
250 let let_ident_pat = match let_stmt.pat()? { in join_assignments()
271 edit.delete(let_stmt.semicolon_token()?.text_range().cover(lhs.syntax().text_range())); in join_assignments()
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_db/src/helpers/
H A Dnode_ext.rs45 if let Some(let_stmt) = node.parent().and_then(ast::LetStmt::cast) { in preorder_expr()
46 if Some(node.clone()) != let_stmt.initializer().map(|it| it.syntax().clone()) { in preorder_expr()
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_db/src/helpers/
H A Dnode_ext.rs45 if let Some(let_stmt) = node.parent().and_then(ast::LetStmt::cast) { in preorder_expr()
46 if Some(node.clone()) != let_stmt.initializer().map(|it| it.syntax().clone()) { in preorder_expr()
/dports/devel/racer/racer-2.1.48/src/racer/
H A Dast.rs178 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
179 if let ExprKind::Let(pat, ..) = &let_stmt.kind { in visit_expr()
1340 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
1341 if let ExprKind::Let(pat, expr) = &let_stmt.kind { in visit_expr()
/dports/devel/racer/racer-2.1.48/cargo-crates/racer-2.1.47/src/racer/
H A Dast.rs178 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
179 if let ExprKind::Let(pat, ..) = &let_stmt.kind { in visit_expr()
1340 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
1341 if let ExprKind::Let(pat, expr) = &let_stmt.kind { in visit_expr()
/dports/lang/rust/rustc-1.58.1-src/vendor/racer/src/racer/
H A Dast.rs178 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
179 if let ExprKind::Let(pat, ..) = &let_stmt.kind { in visit_expr()
1340 ExprKind::If(let_stmt, ..) | ExprKind::While(let_stmt, ..) => { in visit_expr()
1341 if let ExprKind::Let(pat, expr) = &let_stmt.kind { in visit_expr()

12