We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eea2149 commit 61fb165Copy full SHA for 61fb165
crates/syntax/src/ast/make.rs
@@ -222,6 +222,9 @@ pub fn expr_if(
222
};
223
expr_from_text(&format!("if {} {} {}", condition, then_branch, else_branch))
224
}
225
+pub fn expr_for_loop(pat: ast::Pat, expr: ast::Expr, block: ast::BlockExpr) -> ast::Expr {
226
+ expr_from_text(&format!("for {} in {} {}", pat, expr, block))
227
+}
228
pub fn expr_prefix(op: SyntaxKind, expr: ast::Expr) -> ast::Expr {
229
let token = token(op);
230
expr_from_text(&format!("{}{}", token, expr))
0 commit comments