|
1 | | -use crate::{AssetParseError, linker::generate_link_section, resolve_path}; |
| 1 | +use crate::{AssetParseError, PathResolver, linker::generate_link_section}; |
2 | 2 | use macro_string::MacroString; |
3 | 3 | use proc_macro2::TokenStream as TokenStream2; |
4 | 4 | use quote::{ToTokens, quote}; |
@@ -45,7 +45,7 @@ impl Parse for AssetParser { |
45 | 45 | fn parse(input: ParseStream) -> syn::Result<Self> { |
46 | 46 | // And then parse the options |
47 | 47 | let (MacroString(src), path_expr) = input.call(crate::parse_with_tokens)?; |
48 | | - let asset = resolve_path(&src, path_expr.span()); |
| 48 | + let asset = PathResolver::new(&src, &path_expr.span()).resolve(); |
49 | 49 | let _comma = input.parse::<Token![,]>(); |
50 | 50 | let options = input.parse()?; |
51 | 51 |
|
@@ -133,7 +133,7 @@ impl AssetParser { |
133 | 133 | let asset_tokens = self.expand_asset_tokens(asset); |
134 | 134 | quote! { ::core::option::Option::Some(#asset_tokens) } |
135 | 135 | } |
136 | | - Err(AssetParseError::AssetDoesntExist { .. }) => { |
| 136 | + Err(AssetParseError::DoesNotExist { .. }) => { |
137 | 137 | quote! { ::core::option::Option::<manganis::Asset>::None } |
138 | 138 | } |
139 | 139 | Err(err) => self.error_tokens(err), |
|
0 commit comments