Skip to content

Commit

Permalink
rename KVAttributeValue::Braced -> KVAttributeValue::InvalidBraced
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibanayui committed Jul 25, 2024
1 parent f6093da commit 725e2ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/node/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct AttributeValueExpr {
#[derive(Clone, Debug, syn_derive::ToTokens)]
pub enum KVAttributeValue {
Expr(Expr),
Braced(InvalidBlock),
InvalidBraced(InvalidBlock),
}

impl AttributeValueExpr {
Expand Down Expand Up @@ -140,7 +140,7 @@ impl KeyedAttribute {
.to_value()
.map(|v| match &v.value {
KVAttributeValue::Expr(expr) => Some(expr),
KVAttributeValue::Braced(_) => None,
KVAttributeValue::InvalidBraced(_) => None,
})
.flatten()
}
Expand Down Expand Up @@ -265,7 +265,7 @@ impl ParseRecoverable for KeyedAttribute {

Err(_) if input.fork().peek(Brace) => {
let ivb = parser.parse_simple(input)?;
KVAttributeValue::Braced(ivb)
KVAttributeValue::InvalidBraced(ivb)
}
Err(_) => {
let res = fork
Expand Down
2 changes: 1 addition & 1 deletion src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ where
self.visit_node_name(key);
match &mut value.value {
KVAttributeValue::Expr(expr) => self.visit_rust_code(RustCode::Expr(expr)),
KVAttributeValue::Braced(braced) => self.visit_invalid_block(braced),
KVAttributeValue::InvalidBraced(braced) => self.visit_invalid_block(braced),
}
}
fn visit_attribute_block(
Expand Down

0 comments on commit 725e2ec

Please sign in to comment.