/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! AST nodes and code to parse them from syn
use proc_macro2::Literal; // Use IndexMap for mappings. This preserves the field order and makes the diffs look nicer. use syn::{Generics, Ident, Type, Visibility};
/// Struct/Enum node in the IR #[derive(Clone)] #[allow(dead_code)] pubstruct Node { pub attrs: Attributes, pub vis: Visibility, pub ident: Ident, pub generics: Generics, pub def: NodeDef,
}
#[derive(Clone)] pubenum Fields {
Unit,
Named(Vec<Field>),
Unnamed(Vec<Field>),
}
#[derive(Clone)] #[allow(dead_code)] pubstruct Field { pub attrs: Attributes, pub vis: Visibility, pub ident: Option<Ident>, pub ty: Type, /// Variable name used it patterns, this will be `ident` for named fields and `var{idx}` for /// unnamed fields. pub var_name: Ident,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.