Function cexpr::expr::macro_definition [] [src]

pub fn macro_definition<'a>(
    input: &'a [Token]
) -> CResult<'a, (&'a [u8], EvalResult)>

Parse and evaluate a macro definition from of a list of tokens.

Returns the identifier for the macro and its replacement evaluated as an expression. The input should not include #define.

Returns an error if the replacement is not a valid expression, if called on a function-like macro, or if the token stream contains comments, keywords or identifiers.