simple literals in editor ast

This commit is contained in:
Folkert 2020-12-15 17:00:08 +01:00
parent a174137351
commit 8b289f3398
6 changed files with 291 additions and 8 deletions

View file

@ -1486,7 +1486,7 @@ fn flatten_str_literal<'a>(
}
}
fn is_valid_interpolation(expr: &ast::Expr<'_>) -> bool {
pub fn is_valid_interpolation(expr: &ast::Expr<'_>) -> bool {
match expr {
ast::Expr::Var { .. } => true,
ast::Expr::Access(sub_expr, _) => is_valid_interpolation(sub_expr),