diff --git a/compiler/parse/src/blankspace.rs b/compiler/parse/src/blankspace.rs index f13526a7a5..2a65db1960 100644 --- a/compiler/parse/src/blankspace.rs +++ b/compiler/parse/src/blankspace.rs @@ -197,7 +197,11 @@ where Err((MadeProgress, indent_problem(state.pos()), state)) } else { let comments_and_newlines = Vec::with_capacity_in(newlines, arena); - let spaces = eat_spaces(state, false, comments_and_newlines); + let mut spaces = eat_spaces(state, false, comments_and_newlines); + + if spaces.multiline { + spaces.state.indent_column = spaces.state.column(); + } Ok(( MadeProgress, diff --git a/compiler/parse/src/state.rs b/compiler/parse/src/state.rs index a7287dd282..4e936d7589 100644 --- a/compiler/parse/src/state.rs +++ b/compiler/parse/src/state.rs @@ -13,11 +13,11 @@ pub struct State<'a> { offset: usize, /// Position of the start of the current line - pub line_start: Position, + pub(crate) line_start: Position, /// Current indentation level, in columns /// (so no indent is col 1 - this saves an arithmetic operation.) - pub indent_column: u32, + pub(crate) indent_column: u32, } impl<'a> State<'a> {