File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Sources/_MatchingEngine/Regex/Parse Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -100,18 +100,19 @@ extension Source {
100
100
}
101
101
}
102
102
103
- mutating func tryEatNonEmpty( _ c: Char ) throws -> Bool {
104
- guard !isEmpty else { throw ParseError . expected ( String ( c) ) }
105
- return tryEat ( c)
106
- }
107
-
108
103
mutating func tryEatNonEmpty< C: Collection > ( sequence c: C ) throws -> Bool
109
104
where C. Element == Char
110
105
{
111
- guard !isEmpty else { throw ParseError . expected ( String ( c) ) }
106
+ _ = try recordLoc { src in
107
+ guard !src. isEmpty else { throw ParseError . expected ( String ( c) ) }
108
+ }
112
109
return tryEat ( sequence: c)
113
110
}
114
111
112
+ mutating func tryEatNonEmpty( _ c: Char ) throws -> Bool {
113
+ try tryEatNonEmpty ( sequence: String ( c) )
114
+ }
115
+
115
116
/// Throws an expected ASCII character error if not matched
116
117
mutating func expectASCII( ) throws -> Located < Character > {
117
118
try recordLoc { src in
You can’t perform that action at this time.
0 commit comments