diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/syn/src/verbatim.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/syn/src/verbatim.rs')
-rw-r--r-- | vendor/syn/src/verbatim.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/syn/src/verbatim.rs b/vendor/syn/src/verbatim.rs deleted file mode 100644 index 54dc1cf..0000000 --- a/vendor/syn/src/verbatim.rs +++ /dev/null @@ -1,33 +0,0 @@ -use crate::parse::ParseStream; -use proc_macro2::{Delimiter, TokenStream}; -use std::cmp::Ordering; -use std::iter; - -pub(crate) fn between<'a>(begin: ParseStream<'a>, end: ParseStream<'a>) -> TokenStream { - let end = end.cursor(); - let mut cursor = begin.cursor(); - assert!(crate::buffer::same_buffer(end, cursor)); - - let mut tokens = TokenStream::new(); - while cursor != end { - let (tt, next) = cursor.token_tree().unwrap(); - - if crate::buffer::cmp_assuming_same_buffer(end, next) == Ordering::Less { - // A syntax node can cross the boundary of a None-delimited group - // due to such groups being transparent to the parser in most cases. - // Any time this occurs the group is known to be semantically - // irrelevant. https://github.com/dtolnay/syn/issues/1235 - if let Some((inside, _span, after)) = cursor.group(Delimiter::None) { - assert!(next == after); - cursor = inside; - continue; - } else { - panic!("verbatim end must not be inside a delimited group"); - } - } - - tokens.extend(iter::once(tt)); - cursor = next; - } - tokens -} |