sails-macros-core 1.0.0-beta.3

Implementations of procedural macros for the Sails framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
use syn::{Path, parse_quote};

pub const SAILS: &str = "sails_rs";

pub(crate) fn sails_path_or_default(sails_custom_path: Option<syn::Path>) -> syn::Path {
    sails_custom_path.unwrap_or_else(|| syn::parse_str(SAILS).unwrap())
}

pub(crate) fn type_info_path(sails_path: &Path) -> syn::Path {
    parse_quote!(#sails_path::type_info)
}