frame-support-procedural-tools 13.0.0
“Proc macro helpers for procedural macros”
Rust replaces matched string contentReads a Rust environment variable
SHA-256bead15a320be1764cdd50458c4cfacb23e0cee65f64f500f8e34136a94c7eeca
MaleculeH₂(DbOs)
Evidence
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0 …
14:48… , either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// tag::description[]
19//! Proc macro helpers for procedural …
20:8… :description[]
21
22// reexport proc macros
23pub use frame_support_procedural_tools_derive::*;
24
25use proc_macro_crate::{crate_name, FoundCrate};
26use quote::quote;
27use syn::parse::Error;
28
29pub mod syn_ext;
30
31// FIXME #1569, remove the following functions, which are copied from sp-api-macros
32use proc_macro2::{Span, TokenStream};
33use syn::Ident;
34
35fn generate_hidden_includes_mod_name(unique_id: &str) -> Ident {
36 Ident::new(&format!("sp_api …
40:21… e_access(unique_id: &str, def_crate: &str) -> TokenStream {
41 if std::env::var("CARGO_PKG_NAME").unwrap() == def_crate {
42 let frame_support = match generate_access_from_frame_or_crate("frame-support") {
43 …
76:27… name(def_crate) {
77 Ok(FoundCrate::Itself) => {
78 let name = def_crate.to_string().replace("-", "_");
79 Ok(syn::Ident::new(&name, Span::call_site()))
80 },
81 Ok(FoundCrate::Name(name)) => Ok(Ident::new(&name, Span …
No evidence locations were recorded for this file. Raw result