Skip to content

Commit

Permalink
feat: allow atomic groups in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Nov 1, 2023
1 parent 4ac6824 commit 19c8b5c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pomsky-lib/src/exprs/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ impl<'i> RuleExt<'i> for Group<'i> {
if let GroupKind::Atomic = self.kind {
options.allowed_features.require(PomskyFeatures::ATOMIC_GROUPS, self.span)?;

// Python supports atomic groups since 3.11, but it's fairly new, so we forbid
// it for now
if let RegexFlavor::JavaScript | RegexFlavor::Python | RegexFlavor::Rust =
options.flavor
{
if let RegexFlavor::JavaScript | RegexFlavor::Rust = options.flavor {
return Err(CompileErrorKind::Unsupported(Feature::AtomicGroups, options.flavor)
.at(self.span));
}
Expand Down

0 comments on commit 19c8b5c

Please sign in to comment.