mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix indent issue when parsing tag unions
This commit is contained in:
parent
ba0408a587
commit
c8e554e119
3 changed files with 19 additions and 7 deletions
|
@ -1750,7 +1750,7 @@ fn to_precord_report<'a>(
|
|||
}
|
||||
|
||||
PRecord::IndentEnd(row, col) => {
|
||||
match next_line_starts_with_close_curly(alloc.src_lines, row.saturating_sub(1)) {
|
||||
match next_line_starts_with_close_curly(alloc.src_lines, row) {
|
||||
Some((curly_row, curly_col)) => {
|
||||
let surroundings =
|
||||
Region::from_rows_cols(start_row, start_col, curly_row, curly_col);
|
||||
|
@ -1895,7 +1895,7 @@ fn to_pattern_in_parens_report<'a>(
|
|||
}
|
||||
|
||||
PInParens::IndentEnd(row, col) => {
|
||||
match next_line_starts_with_close_parenthesis(alloc.src_lines, row.saturating_sub(1)) {
|
||||
match next_line_starts_with_close_parenthesis(alloc.src_lines, row) {
|
||||
Some((curly_row, curly_col)) => {
|
||||
let surroundings =
|
||||
Region::from_rows_cols(start_row, start_col, curly_row, curly_col);
|
||||
|
@ -2257,7 +2257,7 @@ fn to_trecord_report<'a>(
|
|||
}
|
||||
|
||||
TRecord::IndentEnd(row, col) => {
|
||||
match next_line_starts_with_close_curly(alloc.src_lines, row.saturating_sub(1)) {
|
||||
match next_line_starts_with_close_curly(alloc.src_lines, row) {
|
||||
Some((curly_row, curly_col)) => {
|
||||
let surroundings =
|
||||
Region::from_rows_cols(start_row, start_col, curly_row, curly_col);
|
||||
|
@ -2478,7 +2478,7 @@ fn to_ttag_union_report<'a>(
|
|||
}
|
||||
|
||||
TTagUnion::IndentEnd(row, col) => {
|
||||
match next_line_starts_with_close_square_bracket(alloc.src_lines, row - 1) {
|
||||
match next_line_starts_with_close_square_bracket(alloc.src_lines, row) {
|
||||
Some((curly_row, curly_col)) => {
|
||||
let surroundings =
|
||||
Region::from_rows_cols(start_row, start_col, curly_row, curly_col);
|
||||
|
@ -2682,7 +2682,7 @@ fn to_tinparens_report<'a>(
|
|||
}
|
||||
|
||||
TInParens::IndentEnd(row, col) => {
|
||||
match next_line_starts_with_close_square_bracket(alloc.src_lines, row - 1) {
|
||||
match next_line_starts_with_close_parenthesis(alloc.src_lines, row) {
|
||||
Some((curly_row, curly_col)) => {
|
||||
let surroundings =
|
||||
Region::from_rows_cols(start_row, start_col, curly_row, curly_col);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue