1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
This commit is contained in:
mat 2022-05-27 19:36:18 -05:00
parent 88bc6d1660
commit c0433b7d49
3 changed files with 8 additions and 4 deletions

View file

@ -38,7 +38,11 @@ impl Parse for PropertyDefinition {
// Ceiling
// };
let name = input.parse()?;
let variants = input.parse_terminated(Ident::parse)?;
let content;
braced!(content in input);
let variants = content.parse_terminated(Ident::parse)?;
input.parse::<Token![;]>()?;
Ok(PropertyDefinition { name, variants })
}
@ -130,7 +134,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream {
});
}
let property_name = property.name;
let property_name = &property.name;
property_enums.extend(quote! {
#[derive(Debug, Clone, Copy)]

View file

@ -1,4 +1,5 @@
use crate::{behavior::BlockBehavior, properties};
use crate::behavior::BlockBehavior;
use block_macros::make_block_states;
make_block_states! {
PROPERTIES => {

View file

@ -1,3 +1,2 @@
pub mod behavior;
pub mod blocks;
pub mod properties;