mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
reduce visibility
This commit is contained in:
parent
4894123d21
commit
055d3798d4
@ -132,7 +132,7 @@ pub struct Parser<'a> {
|
||||
/// into modules, and sub-parsers have new values for this name.
|
||||
pub root_module_name: Option<String>,
|
||||
crate expected_tokens: Vec<TokenType>,
|
||||
crate token_cursor: TokenCursor,
|
||||
token_cursor: TokenCursor,
|
||||
desugar_doc_comments: bool,
|
||||
/// `true` we should configure out of line modules as we parse.
|
||||
pub cfg_mods: bool,
|
||||
@ -161,19 +161,19 @@ impl<'a> Drop for Parser<'a> {
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
crate struct TokenCursor {
|
||||
crate frame: TokenCursorFrame,
|
||||
crate stack: Vec<TokenCursorFrame>,
|
||||
struct TokenCursor {
|
||||
frame: TokenCursorFrame,
|
||||
stack: Vec<TokenCursorFrame>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
crate struct TokenCursorFrame {
|
||||
crate delim: token::DelimToken,
|
||||
crate span: DelimSpan,
|
||||
crate open_delim: bool,
|
||||
crate tree_cursor: tokenstream::Cursor,
|
||||
crate close_delim: bool,
|
||||
crate last_token: LastToken,
|
||||
struct TokenCursorFrame {
|
||||
delim: token::DelimToken,
|
||||
span: DelimSpan,
|
||||
open_delim: bool,
|
||||
tree_cursor: tokenstream::Cursor,
|
||||
close_delim: bool,
|
||||
last_token: LastToken,
|
||||
}
|
||||
|
||||
/// This is used in `TokenCursorFrame` above to track tokens that are consumed
|
||||
|
@ -69,7 +69,7 @@ pub enum Fixity {
|
||||
|
||||
impl AssocOp {
|
||||
/// Creates a new AssocOP from a token
|
||||
pub fn from_token(t: &Token) -> Option<AssocOp> {
|
||||
crate fn from_token(t: &Token) -> Option<AssocOp> {
|
||||
use AssocOp::*;
|
||||
match t.kind {
|
||||
token::BinOpEq(k) => Some(AssignOp(k)),
|
||||
|
Loading…
Reference in New Issue
Block a user