Skip to content

Commit

Permalink
Only parse correctly tagged (sql...) templates (#85)
Browse files Browse the repository at this point in the history
Only parse correctly _tagged_ templates - will follow up fix broken tests
  • Loading branch information
andersthuesen authored Dec 2, 2023
1 parent a1b70e7 commit d4e084b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/parser/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,6 @@ pub fn get_sql_from_expr(
Expr::Ident(_ident) => {}
Expr::Lit(_lit) => {}
Expr::Tpl(tpl) => {
let new_sqls: Vec<SQL> = tpl
.quasis
.iter()
.map(|tpl_element| SQL {
var_decl_name: var_decl_name.to_owned(),
query: tpl_element.raw.to_string(),
span: span.clone(),
})
.collect();

if !new_sqls.is_empty() {
sqls.extend(new_sqls);
}

for expr in &tpl.exprs {
get_sql_from_expr(sqls, var_decl_name, expr, span, import_alias);
}
Expand Down

0 comments on commit d4e084b

Please sign in to comment.