use proc_macro2::TokenStream;
use syn::{ExprLit, spanned::Spanned};


pub(crate) fn repo_include_str(input: ExprLit) -> syn::Result<TokenStream> {
    let span = input.span();
    let repo_dir = repo_path_lib::repo_dir();

    let path = super::parse_relative_path(repo_dir, Some(&input))?;

    let path = super::convert_path_to_string(&path, span)?;

    let expanded = quote::quote_spanned! { span =>
        ::std::include_str!(#path)
    };
    Ok(expanded)
}
