Struct syntex_syntax::ext::base::DummyResult
[−]
[src]
pub struct DummyResult { // some fields omitted }
Fill-in macro expansion result, to allow compilation to continue after hitting errors.
Methods
impl DummyResult
fn any(sp: Span) -> Box<MacResult + 'static>
Create a default MacResult that can be anything.
Use this as a return value after hitting any errors and
calling span_err
.
fn expr(sp: Span) -> Box<MacResult + 'static>
Create a default MacResult that can only be an expression.
Use this for macros that must expand to an expression, so even if an error is encountered internally, the user will receive an error that they also used it in the wrong place.
fn raw_expr(sp: Span) -> P<Expr>
A plain dummy expression.
fn raw_pat(sp: Span) -> Pat
A plain dummy pattern.