Docs.rs
  • proc-macro-utils-0.10.0
    • proc-macro-utils 0.10.0
    • Permalink
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • ModProg
    • Dependencies
      • proc-macro2 ^1 normal optional
      • quote ^1 normal optional
      • smallvec ^1.5 normal optional
      • quote ^1 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate proc_macro_utils

proc_macro_utils0.10.0

  • All Items

Crate Items

  • Macros
  • Structs
  • Traits

Crates

  • proc_macro_utils

Crate proc_macro_utils

Source
Expand description

Some useful functions on proc_macro and proc_macro2 types

E.g. pushing tokens onto TokenStream and testing for specific punctuation on TokenTree and Punct

It also adds the assert_tokens! and assert_expansion! macros to improve unit testability for proc-macros.

Macros§

assert_expansionparser
Allows simple unit testing of proc macro implementations.
assert_tokensparser
Asserts that the lhs matches the tokens wrapped in braces on the rhs.

Structs§

TokenParserparser
Wrapper for TokenStream::into_iter allowing not only to iterate on tokens but also to parse simple structures like types or expressions, though it does not make any claims about their correctness.

Traits§

Delimited
Trait to test for delimiters of groups
TokenStream2Extproc-macro2
Generic extensions for proc_macro2::TokenStream
TokenStreamExtproc-macro
Generic extensions for proc_macro::TokenStream
TokenTree2Extproc-macro2
Generic extensions for proc_macro2::TokenTree
TokenTreeExtproc-macro
Generic extensions for proc_macro::TokenTree
TokenTreeLiteral
Trait to parse literals
TokenTreePunct
Trait to test for punctuation

Results

Settings
Help
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.