Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Added support for `not in` and `is not` compound operators.

## [0.7.0] - 2025-11-11

### Added
Expand Down
4 changes: 4 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added

- Added support for `not in` and `is not` compound operators.

## 0.7.0 - 2025-11-11

### Added
Expand Down
84 changes: 84 additions & 0 deletions core/datatests/generators/optimising_line_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ mod comments {
child_lines::generate(root_dir);
conditional_directives::generate(root_dir);
individual_block::generate(root_dir);
compound_operators::generate(root_dir);
}

mod midline_line {
Expand Down Expand Up @@ -680,6 +681,44 @@ mod comments {
);
}
}

mod compound_operators {
use super::*;

pub fn generate(root_dir: &Path) {
generate_test_cases!(
root_dir,
not_in = "
AA := AAA {} not {} in {} BBB;
AAA :=
AAA {} not {} in {} BBB;
AAA :=
AAAAA {}
not {} in {} BBBB;
AAA :=
AAAAA {}
not {} in {} BBBBBBBBB;
AAA :=
AAAAA
{}
not
{} in
{} BBBBBBBBB;
AAA :=
AAAAA
{
}
not
{
}
in
{
}
BBBBBBBBB;
",
);
}
}
}

mod anonymous {
Expand Down Expand Up @@ -4312,6 +4351,51 @@ mod expressions {
and DDDDDDD;

",
compound = "
A := AAAAAAAA not in BBBBBBBB;
A :=
AAAAAAAA not in BBBBBBBBB;
A :=
AAAAAAAAA
not in BBBBBBBBB;
A :=
AAAAAAAAA
not in BBBBBBBBBBBBBBB;
A :=
AAAAAA + BBBBBB + CCCCCCCC
not in DDDDDDDDDDDDDD;
A :=
AAAAAA + BBBBBB + CCCCCCCC
not in DDDDD + EEEEEE;
A :=
AAAAAAA
+ BBBBBBB
+ CCCCCCC
not in DDDDDDDDDDDDDD;
A :=
AAAAAA + BBBBBB + CCCCCCCC
not in DDDDDD
+ EEEEEE;
A := AAAAAAAA is not BBBBBBBB;
A :=
AAAAAAAA is not BBBBBBBBB;
A :=
AAAAAAAAA
is not BBBBBBBBB;
A :=
AAAAAAAAA
is not BBBBBBBBBBBBBBB;
A := (AAA not in [DDD + EEE]);
A :=
(AAAA not in [DDD + EEE]);
A :=
(AAAAA
not in [DDD + EEE]);
A :=
(AAAAA
not in [
DDDDD + EEEE]);
",
);
}
}
Expand Down
Loading
Loading