Remove all pub.

This commit is contained in:
Tom Alexander
2023-09-11 13:11:08 -04:00
parent a74319d381
commit 7650a9edff
71 changed files with 493 additions and 493 deletions

View File

@@ -11,10 +11,10 @@ use nom::Slice;
use crate::error::CustomError;
use crate::error::MyError;
pub type BracketDepth = i16;
type BracketDepth = i16;
#[derive(Copy, Clone)]
pub struct OrgSource<'s> {
struct OrgSource<'s> {
full_source: &'s str,
start: usize,
end: usize, // exclusive
@@ -37,7 +37,7 @@ impl<'s> OrgSource<'s> {
/// Returns a wrapped string that keeps track of values we need for parsing org-mode.
///
/// Only call this on the full original string. Calling this on a substring can result in invalid values.
pub fn new(input: &'s str) -> Self {
fn new(input: &'s str) -> Self {
OrgSource {
full_source: input,
start: 0,
@@ -51,37 +51,37 @@ impl<'s> OrgSource<'s> {
}
/// Get the text since the line break preceding the start of this WrappedInput.
pub fn text_since_line_break(&self) -> &'s str {
fn text_since_line_break(&self) -> &'s str {
&self.full_source[self.start_of_line..self.start]
}
pub fn len(&self) -> usize {
fn len(&self) -> usize {
self.end - self.start
}
pub fn get_preceding_character(&self) -> Option<char> {
fn get_preceding_character(&self) -> Option<char> {
self.preceding_character
}
pub fn is_at_start_of_line(&self) -> bool {
fn is_at_start_of_line(&self) -> bool {
self.start == self.start_of_line
}
pub fn get_until(&self, other: OrgSource<'s>) -> OrgSource<'s> {
fn get_until(&self, other: OrgSource<'s>) -> OrgSource<'s> {
assert!(other.start >= self.start);
assert!(other.end <= self.end);
self.slice(..(other.start - self.start))
}
pub fn get_bracket_depth(&self) -> BracketDepth {
fn get_bracket_depth(&self) -> BracketDepth {
self.bracket_depth
}
pub fn get_brace_depth(&self) -> BracketDepth {
fn get_brace_depth(&self) -> BracketDepth {
self.brace_depth
}
pub fn get_parenthesis_depth(&self) -> BracketDepth {
fn get_parenthesis_depth(&self) -> BracketDepth {
self.parenthesis_depth
}
}
@@ -306,7 +306,7 @@ impl<'s> InputTakeAtPosition for OrgSource<'s> {
}
}
pub fn convert_error<'a, I: Into<CustomError<&'a str>>>(
fn convert_error<'a, I: Into<CustomError<&'a str>>>(
err: nom::Err<I>,
) -> nom::Err<CustomError<&'a str>> {
match err {