File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ public struct Parser<Subject: Collection> {
121
121
}
122
122
}
123
123
124
+ #if !$Embedded
124
125
/// Advances the parser by matching the given regex against the prefix of the remainder of the subject.
125
126
///
126
127
/// If the regex does not match the prefix of the remainder of the subject, the parser will not be advanced.
@@ -135,6 +136,7 @@ public struct Parser<Subject: Collection> {
135
136
}
136
137
self . position = match. range. upperBound
137
138
}
139
+ #endif
138
140
139
141
// MARK: Peek
140
142
@@ -201,6 +203,7 @@ public struct Parser<Subject: Collection> {
201
203
self . remainder ( ) . prefix ( prefix. count) == prefix
202
204
}
203
205
206
+ #if !$Embedded
204
207
/// Returns whether the prefix of the remainder of the subject matches the given regex.
205
208
///
206
209
/// If the regex includes a transformation closure that throws an error, the error will be ignored and `false` will be returned.
@@ -212,6 +215,7 @@ public struct Parser<Subject: Collection> {
212
215
public func hasPrefix( _ regex: some RegexComponent ) -> Bool where SubSequence == Substring {
213
216
self . remainder ( ) . prefixMatch ( of: regex) != nil
214
217
}
218
+ #endif
215
219
216
220
// MARK: Pop
217
221
@@ -303,6 +307,7 @@ public struct Parser<Subject: Collection> {
303
307
return prefix
304
308
}
305
309
310
+ #if !$Embedded
306
311
/// Returns the match of the given regex if it matches the prefix of the remainder of the subject, and advances the parser by the match if so.
307
312
///
308
313
/// - Parameter regex: The regex to match.
@@ -317,6 +322,7 @@ public struct Parser<Subject: Collection> {
317
322
self . position = match. range. upperBound
318
323
return match
319
324
}
325
+ #endif
320
326
321
327
// MARK: View
322
328
You can’t perform that action at this time.
0 commit comments