Browse Source

Merge pull request #15 from kazimuth/master

Update to nightly 2017-02-15
master
Geoffry Song GitHub 3 years ago
parent
commit
3f56ba6e2f
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      README.md
  2. +5
    -1
      src/lexer.rs

+ 1
- 1
README.md View File

@@ -13,7 +13,7 @@ This crate provides a couple syntax extensions:
give each nonterminal a Rust type, allowing you to build an AST recursively.
It also supports spans, giving you convenient source location reporting.

You can find a demo in `examples/demo.rs`. Note that nightly Rust is required.
You can find a demo in `examples/demo.rs`. Note that nightly Rust (> 2017-02-15) is required.

## Usage



+ 5
- 1
src/lexer.rs View File

@@ -113,7 +113,11 @@ fn parse_lexer<'a>(cx: &mut base::ExtCtxt<'a>, sp: codemap::Span, args: &[TokenT
try!(parser.expect(&token::OpenDelim(token::Paren)));
let text_pat = try!(parser.parse_pat());
let text_lt = if parser.eat(&token::Colon) {
try!(parser.parse_lifetime())
if let Some(lt) = parser.eat_lifetime() {
lt
} else {
return Err(parser.fatal("expected a lifetime"));
}
} else {
cx.lifetime(DUMMY_SP, Symbol::gensym("text"))
};


Loading…
Cancel
Save