Skip to content

Commit 5263ccc

Browse files
committed
Swift: Bite the bullet and make 'regex' a non-optional field of the regex test, so that we can be confident where we fail to identify them.
1 parent 24c385b commit 5263ccc

File tree

5 files changed

+201
-200
lines changed

5 files changed

+201
-200
lines changed

swift/ql/test/library-tests/regex/parse.expected

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6487,77 +6487,75 @@ regex.swift:
64876487

64886488
# 215| [RegExpConstant, RegExpNormalChar] a
64896489

6490-
# 216| [RegExpNamedCharacterProperty] [:aaaaa:]
6490+
# 217| [RegExpNamedCharacterProperty] [:aaaaa:]
64916491

6492-
# 221| [RegExpZeroWidthMatch] (?i)
6492+
# 222| [RegExpZeroWidthMatch] (?i)
64936493

6494-
# 221| [RegExpSequence] (?i)abc
6494+
# 222| [RegExpSequence] (?i)abc
64956495
#-----| 0 -> [RegExpZeroWidthMatch] (?i)
64966496
#-----| 1 -> [RegExpConstant, RegExpNormalChar] abc
64976497

6498-
# 221| [RegExpConstant, RegExpNormalChar] abc
6498+
# 222| [RegExpConstant, RegExpNormalChar] abc
64996499

6500-
# 222| [RegExpZeroWidthMatch] (?s)
6500+
# 223| [RegExpZeroWidthMatch] (?s)
65016501

6502-
# 222| [RegExpSequence] (?s)abc
6502+
# 223| [RegExpSequence] (?s)abc
65036503
#-----| 0 -> [RegExpZeroWidthMatch] (?s)
65046504
#-----| 1 -> [RegExpConstant, RegExpNormalChar] abc
65056505

6506-
# 222| [RegExpConstant, RegExpNormalChar] abc
6506+
# 223| [RegExpConstant, RegExpNormalChar] abc
65076507

6508-
# 223| [RegExpZeroWidthMatch] (?is)
6508+
# 224| [RegExpZeroWidthMatch] (?is)
65096509

6510-
# 223| [RegExpSequence] (?is)abc
6510+
# 224| [RegExpSequence] (?is)abc
65116511
#-----| 0 -> [RegExpZeroWidthMatch] (?is)
65126512
#-----| 1 -> [RegExpConstant, RegExpNormalChar] abc
65136513

6514-
# 223| [RegExpConstant, RegExpNormalChar] abc
6514+
# 224| [RegExpConstant, RegExpNormalChar] abc
65156515

6516-
# 224| [RegExpGroup] (?i-s)
6516+
# 225| [RegExpGroup] (?i-s)
65176517
#-----| 0 -> [RegExpConstant, RegExpNormalChar] -s
65186518

6519-
# 224| [RegExpSequence] (?i-s)abc
6519+
# 225| [RegExpSequence] (?i-s)abc
65206520
#-----| 0 -> [RegExpGroup] (?i-s)
65216521
#-----| 1 -> [RegExpConstant, RegExpNormalChar] abc
65226522

6523-
# 224| [RegExpConstant, RegExpNormalChar] -s
6523+
# 225| [RegExpConstant, RegExpNormalChar] -s
65246524

6525-
# 224| [RegExpConstant, RegExpNormalChar] abc
6525+
# 225| [RegExpConstant, RegExpNormalChar] abc
65266526

6527-
# 227| [RegExpConstant, RegExpNormalChar] abc
6527+
# 228| [RegExpConstant, RegExpNormalChar] abc
65286528

6529-
# 227| [RegExpSequence] abc(?i)def
6529+
# 228| [RegExpSequence] abc(?i)def
65306530
#-----| 0 -> [RegExpConstant, RegExpNormalChar] abc
65316531
#-----| 1 -> [RegExpZeroWidthMatch] (?i)
65326532
#-----| 2 -> [RegExpConstant, RegExpNormalChar] def
65336533

6534-
# 227| [RegExpZeroWidthMatch] (?i)
6534+
# 228| [RegExpZeroWidthMatch] (?i)
65356535

6536-
# 227| [RegExpConstant, RegExpNormalChar] def
6536+
# 228| [RegExpConstant, RegExpNormalChar] def
65376537

6538-
# 228| [RegExpConstant, RegExpNormalChar] abc
6538+
# 229| [RegExpConstant, RegExpNormalChar] abc
65396539

6540-
# 228| [RegExpSequence] abc(?i:def)ghi
6540+
# 229| [RegExpSequence] abc(?i:def)ghi
65416541
#-----| 0 -> [RegExpConstant, RegExpNormalChar] abc
65426542
#-----| 1 -> [RegExpGroup] (?i:def)
65436543
#-----| 2 -> [RegExpConstant, RegExpNormalChar] ghi
65446544

6545-
# 228| [RegExpGroup] (?i:def)
6545+
# 229| [RegExpGroup] (?i:def)
65466546
#-----| 0 -> [RegExpConstant, RegExpNormalChar] :def
65476547

6548-
# 228| [RegExpConstant, RegExpNormalChar] :def
6549-
6550-
# 228| [RegExpConstant, RegExpNormalChar] ghi
6548+
# 229| [RegExpConstant, RegExpNormalChar] :def
65516549

6552-
# 229| [RegExpZeroWidthMatch] (?i)
6550+
# 229| [RegExpConstant, RegExpNormalChar] ghi
65536551

6554-
# 229| [RegExpConstant, RegExpNormalChar] abc
6552+
# 230| [RegExpZeroWidthMatch] (?i)
65556553

6556-
# 229| [RegExpConstant, RegExpNormalChar] -i
6554+
# 230| [RegExpConstant, RegExpNormalChar] abc
65576555

6558-
# 229| [RegExpConstant, RegExpNormalChar] def
6556+
# 230| [RegExpConstant, RegExpNormalChar] -i
65596557

6560-
# 232| [RegExpConstant, RegExpNormalChar] abc
6558+
# 230| [RegExpConstant, RegExpNormalChar] def
65616559

65626560
# 233| [RegExpConstant, RegExpNormalChar] abc
65636561

@@ -6569,10 +6567,7 @@ regex.swift:
65696567

65706568
# 237| [RegExpConstant, RegExpNormalChar] abc
65716569

6572-
# 240| [RegExpDot] .
6573-
6574-
# 240| [RegExpStar] .*
6575-
#-----| 0 -> [RegExpDot] .
6570+
# 238| [RegExpConstant, RegExpNormalChar] abc
65766571

65776572
# 241| [RegExpDot] .
65786573

@@ -6584,7 +6579,12 @@ regex.swift:
65846579
# 242| [RegExpStar] .*
65856580
#-----| 0 -> [RegExpDot] .
65866581

6587-
# 245| [RegExpDot] .
6582+
# 243| [RegExpDot] .
6583+
6584+
# 243| [RegExpStar] .*
6585+
#-----| 0 -> [RegExpDot] .
6586+
6587+
# 246| [RegExpDot] .
65886588

6589-
# 245| [RegExpStar] .*
6589+
# 246| [RegExpStar] .*
65906590
#-----| 0 -> [RegExpDot] .

0 commit comments

Comments
 (0)