Struct rune::ast::MacroCall [−][src]
A function call <expr>!(<args>)
.
Fields
id: Option<Id>
Opaque identifier for macro call. Use to store reference to internally expanded macros.
attributes: Vec<Attribute>
Attributes associated with macro call.
path: Path
The expression being called over.
bang: Bang
Bang operator !
.
open: Token
Opening token.
stream: TokenStream
The tokens provided to the macro.
close: Token
Closing token.
Implementations
impl MacroCall
[src]
pub fn needs_semi(&self) -> bool
[src]
Test if macro needs semi or not.
pub fn adjust_expr_semi(&self, expr: Expr) -> Expr
[src]
Wrap the expression into an expression that matches the semi convention of the macro call.
pub fn stream_span(&self) -> Span
[src]
The span of the token stream.
pub fn parse_with_meta_path(
parser: &mut Parser<'_>,
attributes: Vec<Attribute>,
path: Path
) -> Result<Self, ParseError>
[src]
parser: &mut Parser<'_>,
attributes: Vec<Attribute>,
path: Path
) -> Result<Self, ParseError>
Parse with an expression.
Trait Implementations
impl Clone for MacroCall
[src]
impl Debug for MacroCall
[src]
impl Eq for MacroCall
[src]
impl Parse for MacroCall
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<MacroCall> for MacroCall
[src]
impl Spanned for MacroCall
[src]
impl StructuralEq for MacroCall
[src]
impl StructuralPartialEq for MacroCall
[src]
impl ToTokens for MacroCall
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for MacroCall
impl Send for MacroCall
impl Sync for MacroCall
impl Unpin for MacroCall
impl UnwindSafe for MacroCall
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,