alchemist-macros 0.0.0

Hot-reload game engine & editor (WIP—MVP coming)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;
use quote::*;
use syn::*;

pub fn core_path_attr(attrs: &[Attribute]) -> TokenStream2 {

    let mut core_path = quote!(::alchemist);

    for attr in attrs.iter() {
        if attr.path().is_ident("core_path") {
            if let Ok(path) = attr.parse_args::<Path>() {
                core_path = quote!(#path);
            }
        }
    }

    core_path
}