Disambiguate expressions in rsx by requiring curlies

This commit is contained in:
Jonathan Kelley committed 2024-01-10 19:33:34 -08:00
1 parent 663296ae45
commit d9b84f9f8f
53 files changed
+399 -373

No files matched your search

+5 -4
View File
@@ -1,11 +1,11 @@
use dioxus_rsx::{AttributeType, BodyNode, ElementAttrValue, ForLoop};
use dioxus_rsx::{AttributeType, BodyNode, ElementAttrValue, ForLoop, IfChain};
use proc_macro2::{LineColumn, Span};
use quote::ToTokens;
use std::{
collections::{HashMap, VecDeque},
fmt::{Result, Write},
};
use syn::{spanned::Spanned, Expr, ExprIf};
use syn::{spanned::Spanned, Expr};
use crate::buffer::Buffer;
use crate::ifmt_to_string;
@@ -231,8 +231,9 @@ impl<'a> Writer<'a> {
Ok(())
}
fn write_if_chain(&mut self, ifchain: &ExprIf) -> std::fmt::Result {
self.write_raw_expr(ifchain.span())
fn write_if_chain(&mut self, ifchain: &IfChain) -> std::fmt::Result {
todo!()
// self.write_raw_expr(ifchain.span())
}
}