mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
Compiles
This commit is contained in:
parent
88bc6d1660
commit
c0433b7d49
3 changed files with 8 additions and 4 deletions
|
@ -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)]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use crate::{behavior::BlockBehavior, properties};
|
||||
use crate::behavior::BlockBehavior;
|
||||
use block_macros::make_block_states;
|
||||
|
||||
make_block_states! {
|
||||
PROPERTIES => {
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
pub mod behavior;
|
||||
pub mod blocks;
|
||||
pub mod properties;
|
||||
|
|
Loading…
Add table
Reference in a new issue