Module ligen::proc_macro[][src]

Expand description

proc-macro entrypoint.

Modules

proc-macro prelude. It’s internally used by the procedural macro functions.

tracked_envExperimental

Tracked access to environment variables.

tracked_pathExperimental

Tracked access to additional files.

Public implementation details for the TokenStream type, such as iterators.

Macros

quoteExperimental

quote!(..) accepts arbitrary tokens and expands into a TokenStream describing the input. For example, quote!(a + b) will produce a expression, that, when evaluated, constructs the TokenStream [Ident("a"), Punct('+', Alone), Ident("b")].

Structs

DiagnosticExperimental

A structure representing a diagnostic message and associated children messages.

LineColumnExperimental

A line-column pair representing the start or end of a Span.

SourceFileExperimental

The source file of a given Span.

A delimited token stream.

An identifier (ident).

Error returned from TokenStream::from_str.

A literal string ("hello"), byte string (b"hello"), character ('a'), byte character (b'a'), an integer or floating point number with or without a suffix (1, 1u8, 2.3, 2.3f32). Boolean literals like true and false do not belong here, they are Idents.

A Punct is a single punctuation character such as +, - or #.

A region of source code, along with macro expansion information.

The main type provided by this crate, representing an abstract stream of tokens, or, more specifically, a sequence of token trees. The type provide interfaces for iterating over those token trees and, conversely, collecting a number of token trees into one stream.

Enums

LevelExperimental

An enum representing a diagnostic level.

Describes how a sequence of token trees is delimited.

Describes whether a Punct is followed immediately by another Punct (Spacing::Joint) or by a different token or whitespace (Spacing::Alone).

A single token or a delimited sequence of token trees (e.g., [1, (), ..]).

Traits

MultiSpanExperimental

Trait implemented by types that can be converted into a set of Spans.

Functions

Used to define a new binding generator macro.

Used to define a new project generator macro.

is_availableExperimental

Determines whether proc_macro has been made accessible to the currently running program.

ligen entry-point called by #[ligen].

ligen_dependencies macro function called by ligen_dependencies!()

ligen_project macro function called by ligen_project!()

quoteExperimental

Quote a TokenStream into a TokenStream. This is the actual implementation of the quote!() proc macro.

quote_spanExperimental

Quote a Span into a TokenStream. This is needed to implement a custom quoter.