Add Ident::as_str
helper
This commit is contained in:
parent
189c0a1297
commit
1e4269cb83
25 changed files with 50 additions and 46 deletions
|
@ -573,7 +573,7 @@ fn inner_parse_loop<'a>(
|
|||
TokenTree::MetaVarDecl(_, _, id) => {
|
||||
// Built-in nonterminals never start with these tokens,
|
||||
// so we can eliminate them from consideration.
|
||||
if may_begin_with(&*id.name.as_str(), token) {
|
||||
if may_begin_with(&*id.as_str(), token) {
|
||||
bb_items.push(item);
|
||||
}
|
||||
}
|
||||
|
@ -742,7 +742,7 @@ pub fn parse(
|
|||
let match_cur = item.match_cur;
|
||||
item.push_match(
|
||||
match_cur,
|
||||
MatchedNonterminal(Rc::new(parse_nt(&mut parser, span, &ident.name.as_str()))),
|
||||
MatchedNonterminal(Rc::new(parse_nt(&mut parser, span, &ident.as_str()))),
|
||||
);
|
||||
item.idx += 1;
|
||||
item.match_cur += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue