Skip to content

Commit 514c962

Browse files
committed
Make sure we dump the isPOSIX bit
1 parent e9e8e08 commit 514c962

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Sources/_MatchingEngine/Regex/AST/Atom.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ extension AST.Atom {
314314

315315
public var _dumpBase: String {
316316
// FIXME: better printing...
317-
"\(kind)\(isInverted)"
317+
"\(kind)\(isInverted)\(isPOSIX)"
318318
}
319319
}
320320
}

Tests/RegexTests/ParseTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,8 @@ extension RegexTests {
822822
// Make sure dumping output correctly reflects differences in AST.
823823
parseNotEqualTest(#"abc"#, #"abd"#)
824824

825+
parseNotEqualTest(#"[\p{Any}]"#, #"[[:Any:]]"#)
826+
825827
parseNotEqualTest(#"[abc[:space:]\d]+"#,
826828
#"[abc[:upper:]\d]+"#)
827829

0 commit comments

Comments
 (0)