Skip to content

Commit

Permalink
Allow multiple puncts in a row in NodeName
Browse files Browse the repository at this point in the history
  • Loading branch information
PizzasBear authored Oct 27, 2023
1 parent 12753af commit e533ffb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/node/node_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ pub enum NodeNameFragment {
// In case when name contain more than one Punct in series
Empty,
}
impl NodeNameFragment {
fn peek_any(input: ParseStream) -> bool {
input.peek(Ident::peek_any) || input.peek(LitInt)
}
}

impl PartialEq<NodeNameFragment> for NodeNameFragment {
fn eq(&self, other: &NodeNameFragment) -> bool {
Expand Down Expand Up @@ -179,7 +174,7 @@ impl NodeName {
let fork = &input.fork();
let mut segments = Punctuated::<X, T>::new();

while !fork.is_empty() && NodeNameFragment::peek_any(fork) {
while !fork.is_empty() {
let ident = NodeNameFragment::parse(fork)?;
segments.push_value(ident.clone().into());

Expand Down

0 comments on commit e533ffb

Please sign in to comment.