Crate drone_macros_core[][src]

Drone procedural macros shared lib.

See drone-core documentation for details.

Macros

try_parse2

Matches the result of syn::parse2. In case of Ok variant, the expression has the value of the wrapped value. In case of Err variant, it retrieves the inner error, emits its message on the given span, and immediately returns an empty TokenStream.

Structs

ExternStatic

Binding to extern static: extern static Foo;.

ExternStruct

Binding to extern struct: extern struct Foo;.

NewMod

Creates a new struct: mod Foo;.

NewStatic

Creates a new static: static Foo;.

NewStruct

Creates a new struct: struct Foo;.

Functions

emit_err2

Emits an error on the given span.

emit_parse_err2

Emits a parse error on the given span.

unkeywordize

Inserts an underscore at the beginning of the string if the string is a reserved keyword.