1fad3a1d3Sopenharmony_ci// This crate crawls the Syn source directory to find all structs and enums that
2fad3a1d3Sopenharmony_ci// form the Syn syntax tree.
3fad3a1d3Sopenharmony_ci//
4fad3a1d3Sopenharmony_ci// A machine-readable representation of the syntax tree is saved to syn.json in
5fad3a1d3Sopenharmony_ci// the repo root for other code generation tools to consume. The syn-codegen
6fad3a1d3Sopenharmony_ci// crate (https://docs.rs/syn-codegen/) provides the data structures for parsing
7fad3a1d3Sopenharmony_ci// and making use of syn.json from Rust code.
8fad3a1d3Sopenharmony_ci//
9fad3a1d3Sopenharmony_ci// Finally this crate generates the Visit, VisitMut, and Fold traits in Syn
10fad3a1d3Sopenharmony_ci// programmatically from the syntax tree description.
11fad3a1d3Sopenharmony_ci
12fad3a1d3Sopenharmony_ci#![allow(
13fad3a1d3Sopenharmony_ci    clippy::items_after_statements,
14fad3a1d3Sopenharmony_ci    clippy::manual_let_else,
15fad3a1d3Sopenharmony_ci    clippy::match_like_matches_macro,
16fad3a1d3Sopenharmony_ci    clippy::similar_names,
17fad3a1d3Sopenharmony_ci    clippy::too_many_lines,
18fad3a1d3Sopenharmony_ci    clippy::uninlined_format_args
19fad3a1d3Sopenharmony_ci)]
20fad3a1d3Sopenharmony_ci
21fad3a1d3Sopenharmony_cimod cfg;
22fad3a1d3Sopenharmony_cimod clone;
23fad3a1d3Sopenharmony_cimod debug;
24fad3a1d3Sopenharmony_cimod eq;
25fad3a1d3Sopenharmony_cimod file;
26fad3a1d3Sopenharmony_cimod fold;
27fad3a1d3Sopenharmony_cimod full;
28fad3a1d3Sopenharmony_cimod gen;
29fad3a1d3Sopenharmony_cimod hash;
30fad3a1d3Sopenharmony_cimod json;
31fad3a1d3Sopenharmony_cimod lookup;
32fad3a1d3Sopenharmony_cimod operand;
33fad3a1d3Sopenharmony_cimod parse;
34fad3a1d3Sopenharmony_cimod snapshot;
35fad3a1d3Sopenharmony_cimod version;
36fad3a1d3Sopenharmony_cimod visit;
37fad3a1d3Sopenharmony_cimod visit_mut;
38fad3a1d3Sopenharmony_cimod workspace_path;
39fad3a1d3Sopenharmony_ci
40fad3a1d3Sopenharmony_cifn main() -> anyhow::Result<()> {
41fad3a1d3Sopenharmony_ci    color_backtrace::install();
42fad3a1d3Sopenharmony_ci    let defs = parse::parse()?;
43fad3a1d3Sopenharmony_ci    clone::generate(&defs)?;
44fad3a1d3Sopenharmony_ci    debug::generate(&defs)?;
45fad3a1d3Sopenharmony_ci    eq::generate(&defs)?;
46fad3a1d3Sopenharmony_ci    hash::generate(&defs)?;
47fad3a1d3Sopenharmony_ci    json::generate(&defs)?;
48fad3a1d3Sopenharmony_ci    fold::generate(&defs)?;
49fad3a1d3Sopenharmony_ci    visit::generate(&defs)?;
50fad3a1d3Sopenharmony_ci    visit_mut::generate(&defs)?;
51fad3a1d3Sopenharmony_ci    snapshot::generate(&defs)?;
52fad3a1d3Sopenharmony_ci    Ok(())
53fad3a1d3Sopenharmony_ci}
54