about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-08 12:59:59 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-10-16 10:59:54 +0200
commitbf02d49e848e331ba8bf3d14e3b3443bc68ab7f3 (patch)
tree5650df816441c05dd0416fcd347957f851d6f0af /src/libsyntax/parse/mod.rs
parentd420d719c4c44c3c6d02b5fafba4f2cf5e837dba (diff)
downloadrust-bf02d49e848e331ba8bf3d14e3b3443bc68ab7f3.tar.gz
rust-bf02d49e848e331ba8bf3d14e3b3443bc68ab7f3.zip
move SeqSep to parser.rs
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 1eaee46a3c2..e6b794a6a99 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -2,7 +2,7 @@
 
 use crate::ast;
 use crate::parse::parser::{Parser, emit_unclosed_delims};
-use crate::parse::token::{Nonterminal, TokenKind};
+use crate::parse::token::Nonterminal;
 use crate::tokenstream::{self, TokenStream, TokenTree};
 use crate::print::pprust;
 use crate::sess::ParseSess;
@@ -271,30 +271,6 @@ pub fn stream_to_parser_with_base_dir<'a>(
     Parser::new(sess, stream, Some(base_dir), true, false, None)
 }
 
-/// A sequence separator.
-pub struct SeqSep {
-    /// The separator token.
-    pub sep: Option<TokenKind>,
-    /// `true` if a trailing separator is allowed.
-    pub trailing_sep_allowed: bool,
-}
-
-impl SeqSep {
-    pub fn trailing_allowed(t: TokenKind) -> SeqSep {
-        SeqSep {
-            sep: Some(t),
-            trailing_sep_allowed: true,
-        }
-    }
-
-    pub fn none() -> SeqSep {
-        SeqSep {
-            sep: None,
-            trailing_sep_allowed: false,
-        }
-    }
-}
-
 // NOTE(Centril): The following probably shouldn't be here but it acknowledges the
 // fact that architecturally, we are using parsing (read on below to understand why).