Struct rune::ast::MacroCall[][src]

pub struct MacroCall {
    pub id: Option<Id>,
    pub attributes: Vec<Attribute>,
    pub path: Path,
    pub bang: Bang,
    pub open: Token,
    pub stream: TokenStream,
    pub close: Token,
}

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]

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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.