Created
January 25, 2014 23:48
-
-
Save uzytkownik/8625649 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[feature(macro_registrar)] | |
extern mod syntax; | |
use syntax::ast::{Name}; | |
use syntax::ext::base::{SyntaxExtension}; | |
#[macro_registrar] | |
fn macro_registrar(register: |Name, SyntaxExtension|) { | |
use syntax::ext::base::{SyntaxExpanderTTExpanderWithoutContext,NormalTT}; | |
use syntax::parse::token; | |
let test = &'static |exp, span, token_tree, context| { | |
use syntax::ext::base::{MacResult}; | |
MacResult::dummy_expr() | |
}; | |
register(token::intern(&"test"), | |
NormalTT(~SyntaxExpanderTTExpanderWithoutContext(cxx_call_expand))); | |
} | |
pub fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cxx_call_expand should be test of course ;)