mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Remove awkward split between header_sources and defs sources
This commit is contained in:
parent
ab8b70aacd
commit
6e67b77fa1
3 changed files with 5 additions and 62 deletions
|
@ -34,7 +34,7 @@ impl<'a> State<'a> {
|
|||
self.original_bytes
|
||||
}
|
||||
|
||||
pub fn bytes(&self) -> &'a [u8] {
|
||||
pub(crate) fn bytes(&self) -> &'a [u8] {
|
||||
&self.original_bytes[self.offset..]
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn advance(&self, offset: usize) -> State<'a> {
|
||||
pub(crate) fn advance(&self, offset: usize) -> State<'a> {
|
||||
let mut state = self.clone();
|
||||
debug_assert!(!state.bytes()[..offset].iter().any(|b| *b == b'\n'));
|
||||
state.offset += offset;
|
||||
|
@ -51,7 +51,7 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn advance_newline(&self) -> State<'a> {
|
||||
pub(crate) fn advance_newline(&self) -> State<'a> {
|
||||
let mut state = self.clone();
|
||||
state.offset += 1;
|
||||
state.line_start = state.pos();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue