]> git.lizzy.rs Git - rust.git/commit
Fix the most egregious instances of "local ambiguity: multiple parsing options.....
authorVadim Chugunov <vadimcn@gmail.com>
Tue, 7 Oct 2014 06:15:12 +0000 (23:15 -0700)
committerVadim Chugunov <vadimcn@gmail.com>
Tue, 7 Oct 2014 09:13:05 +0000 (02:13 -0700)
commitfc60797f7f3079288bdd1717dedbb885eaf1dbfa
tree21306daa9579c113d1609afa78c521e7cc1479e9
parente62ef37cfae680e60584731635a89e955121a5bb
Fix the most egregious instances of "local ambiguity: multiple parsing options..." error in macros, which often occurs when trying to match parts of Rust syntax.
For example, this matcher: `fn $name:ident( $($param:ident : $pty:ty),* )` would fail when parsing `fn foo()`, because macro parser wouldn't realize that an ident cannot start with `)`.

This resolves #5902, and at least partially mitigates #9364 and #3232.
src/libsyntax/ext/tt/macro_parser.rs
src/test/run-pass/macro-nt-list.rs [new file with mode: 0644]