Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce visibility #64236

Merged
merged 1 commit into from
Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/util/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down