1 // Tests that `?` is a Kleene op and not a macro separator in the 2015 edition.
10 ($(a),?) => {}; //~ERROR the `?` macro repetition operator
13 macro_rules! barplus {
14 ($(a)?+) => {}; // ok. matches "a+" and "+"
17 macro_rules! barstar {
18 ($(a)?*) => {}; // ok. matches "a*" and "*"
24 foo!(a?); //~ ERROR no rules expected the token `?`
25 foo!(a?a); //~ ERROR no rules expected the token `?`
26 foo!(a?a?a); //~ ERROR no rules expected the token `?`
28 barplus!(); //~ERROR unexpected end of macro invocation
29 barplus!(a); //~ERROR unexpected end of macro invocation
30 barplus!(a?); //~ ERROR no rules expected the token `?`
31 barplus!(a?a); //~ ERROR no rules expected the token `?`
35 barstar!(); //~ERROR unexpected end of macro invocation
36 barstar!(a); //~ERROR unexpected end of macro invocation
37 barstar!(a?); //~ ERROR no rules expected the token `?`
38 barstar!(a?a); //~ ERROR no rules expected the token `?`