mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Fix bug where newline() didn't consume.
This commit is contained in:
parent
9f5a359051
commit
b0338d06dc
1 changed files with 2 additions and 2 deletions
|
@ -54,11 +54,11 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
/// Increments the line, then resets column, indent_col, and is_indenting.
|
||||
/// This does *not* advance the input.
|
||||
/// Advances the input by 1, to consume the newline character.
|
||||
pub fn newline(&self) -> Result<Self, (Fail, Self)> {
|
||||
match self.line.checked_add(1) {
|
||||
Some(line) => Ok(State {
|
||||
input: self.input,
|
||||
input: &self.input[1..],
|
||||
line,
|
||||
column: 0,
|
||||
indent_col: 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue