Skip to content

Commit

Permalink
Merge pull request #22 from kmcallister/rustup
Browse files Browse the repository at this point in the history
Upgrade to rustc 0.13.0-dev (77f44d4a7 2014-10-29 20:16:57 +0000)
  • Loading branch information
sfackler committed Oct 30, 2014
2 parents 83a8116 + 83dbc06 commit cad7080
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phf_mac/src/lib.rs
Expand Up @@ -20,7 +20,7 @@ use syntax::ext::base::{DummyResult,
MacResult};
use syntax::fold::Folder;
use syntax::parse;
use syntax::parse::token::{InternedString, COMMA, EOF, FAT_ARROW};
use syntax::parse::token::{InternedString, Comma, Eof, FatArrow};
use syntax::print::pprust;
use rustc::plugin::Registry;

Expand Down Expand Up @@ -106,14 +106,14 @@ fn parse_map(cx: &mut ExtCtxt, tts: &[TokenTree]) -> Option<Vec<Entry>> {
let mut entries = Vec::new();

let mut bad = false;
while parser.token != EOF {
while parser.token != Eof {
let key = cx.expander().fold_expr(parser.parse_expr());
let key_contents = parse_key(cx, &*key).unwrap_or_else(|| {
bad = true;
KeyStr(InternedString::new(""))
});

if !parser.eat(&FAT_ARROW) {
if !parser.eat(&FatArrow) {
cx.span_err(parser.span, "expected `=>`");
return None;
}
Expand All @@ -126,7 +126,7 @@ fn parse_map(cx: &mut ExtCtxt, tts: &[TokenTree]) -> Option<Vec<Entry>> {
value: value
});

if !parser.eat(&COMMA) && parser.token != EOF {
if !parser.eat(&Comma) && parser.token != Eof {
cx.span_err(parser.span, "expected `,`");
return None;
}
Expand All @@ -145,7 +145,7 @@ fn parse_set(cx: &mut ExtCtxt, tts: &[TokenTree]) -> Option<Vec<Entry>> {
let value = quote_expr!(&*cx, ());

let mut bad = false;
while parser.token != EOF {
while parser.token != Eof {
let key = cx.expander().fold_expr(parser.parse_expr());
let key_contents = parse_key(cx, &*key).unwrap_or_else(|| {
bad = true;
Expand All @@ -158,7 +158,7 @@ fn parse_set(cx: &mut ExtCtxt, tts: &[TokenTree]) -> Option<Vec<Entry>> {
value: value.clone(),
});

if !parser.eat(&COMMA) && parser.token != EOF {
if !parser.eat(&Comma) && parser.token != Eof {
cx.span_err(parser.span, "expected `,`");
return None;
}
Expand Down

0 comments on commit cad7080

Please sign in to comment.