macro_tools 0.85.0

Tools for writing procedural macroses.
Documentation
//!
//! Keywords
//!

/// Define a private namespace for all its items.
mod private 
{
  // use crate :: *;

  const KEYWORDS: &[ &str] = &[ 
  "as", "break", "const", "continue", "crate", "else", "enum", "extern", "false", "fn", "for", "if", "impl", "in", "let",
  "loop", "match", "mod", "move", "mut", "pub", "ref", "return", "self", "Self", "static", "struct", "super", "trait", "true",
  "type", "unsafe", "use", "where", "while", "async", "await", "dyn", "box", "try", "macro",
 ];

  // qqq: cover by test
  /// Check is string a keyword.
  #[ must_use ]
  pub fn is(src: &str) -> bool
  {
  KEYWORDS.contains(&src)
 }
}

#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use own :: *;

/// Own namespace of the module.
#[ allow( unused_imports ) ]
pub mod own 
{

  use super :: *;
  #[ doc( inline ) ]
  pub use orphan :: *;
}

/// Orphan namespace of the module.
#[ allow( unused_imports ) ]
pub mod orphan 
{

  use super :: *;
  #[ doc( inline ) ]
  pub use exposed :: *;
}

/// Exposed namespace of the module.
#[ allow( unused_imports ) ]
pub mod exposed 
{

  use super :: *;
  pub use super ::super ::kw;

  #[ doc( inline ) ]
  pub use prelude :: *;
  #[ doc( inline ) ]
  pub use private :: { is };
}

/// Prelude to use essentials: `use my_module ::prelude :: *`.
#[ allow( unused_imports ) ]
pub mod prelude 
{
  use super :: *;
}