1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#![cfg_attr(feature = "fold", feature(specialization))]

extern crate ast_node;
extern crate atty;
extern crate either;
extern crate fxhash;
extern crate owning_ref;
extern crate parking_lot;
extern crate rayon;
extern crate rayon_core;
extern crate string_cache;
extern crate termcolor;
extern crate unicode_width;
#[macro_use]
extern crate log;
extern crate scoped_tls;
#[macro_use]
extern crate cfg_if;

#[cfg(feature = "fold")]
pub use self::fold::{Fold, FoldWith, Visit, VisitWith};
pub use self::{
    errors::{SourceMapper, SourceMapperDyn},
    pos::*,
    source_map::{FileLines, FileLoader, FileName, FilePathMapping, SourceMap, SpanSnippetError},
};
pub use ast_node::{ast_node, Fold, FromVariant, Spanned};
use std::fmt::Debug;

/// A marker trait for ast nodes.
pub trait AstNode: Debug + PartialEq + Clone + Spanned {}

impl<N: Debug + PartialEq + Clone + Spanned> AstNode for N {}

pub mod errors;
#[cfg(feature = "fold")]
pub mod fold;
pub mod macros;
mod pos;
mod rustc_data_structures;
mod source_map;
pub mod sync;
mod syntax_pos;
pub mod util;