Skip to content
Snippets Groups Projects
Commit 631e4b04 authored by Jorge Aparicio's avatar Jorge Aparicio
Browse files

change the syntax of the top `resources` to look like static variables

parent b2c59e2a
No related branches found
No related tags found
No related merge requests found
......@@ -269,7 +269,17 @@ fn statics(tts: &mut Peekable<Iter<TokenTree>>) -> Result<Statics> {
let mut tts = tts.iter();
while let Some(tt) = tts.next() {
let ident = if let &TokenTree::Token(Token::Ident(ref id)) = tt {
match tt {
&TokenTree::Token(Token::Ident(ref id))
if id.as_ref() == "static" => {}
_ => {
bail!("expected keyword `static`, found {:?}", tt);
}
}
let tt = tts.next();
let ident =
if let Some(&TokenTree::Token(Token::Ident(ref id))) = tt {
id
} else {
bail!("expected Ident, found {:?}", tt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment