1//! Deprecated, see [`ascii`]
2#![deprecated(since = "0.4.2", note = "Replaced with `ascii`")]
3
4use crate::ascii;
5use crate::error::ParseError;
6use crate::stream::Compare;
7use crate::stream::ContainsToken;
8use crate::stream::{AsBStr, AsChar, Offset, ParseSlice, Stream, StreamIsPartial};
9use crate::IResult;
10use crate::Parser;
11
12/// Deprecated, replaced by [`ascii::crlf`]
13#[deprecated(since = "0.4.2", note = "Replaced with `ascii::crlf`")]
14#[inline(always)]
15pub fn crlf<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
16where
17 I: StreamIsPartial,
18 I: Stream,
19 I: Compare<&'static str>,
20{
21 ascii::crlf.parse_next(input)
22}
23
24/// Deprecated, replaced by [`ascii::not_line_ending`]
25#[deprecated(since = "0.4.2", note = "Replaced with `ascii::not_line_ending`")]
26#[inline(always)]
27pub fn not_line_ending<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
28where
29 I: StreamIsPartial,
30 I: Stream + AsBStr,
31 I: Compare<&'static str>,
32 <I as Stream>::Token: AsChar,
33{
34 ascii::not_line_ending.parse_next(input)
35}
36
37/// Deprecated, replaced by [`ascii::line_ending`]
38#[deprecated(since = "0.4.2", note = "Replaced with `ascii::line_ending`")]
39#[inline(always)]
40pub fn line_ending<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
41where
42 I: StreamIsPartial,
43 I: Stream,
44 I: Compare<&'static str>,
45{
46 ascii::line_ending.parse_next(input)
47}
48
49/// Deprecated, replaced by [`ascii::newline`]
50#[deprecated(since = "0.4.2", note = "Replaced with `ascii::newline`")]
51#[inline(always)]
52pub fn newline<I, Error: ParseError<I>>(input: I) -> IResult<I, char, Error>
53where
54 I: StreamIsPartial,
55 I: Stream,
56 <I as Stream>::Token: AsChar + Copy,
57{
58 ascii::newline.parse_next(input)
59}
60
61/// Deprecated, replaced by [`ascii::tab`]
62#[deprecated(since = "0.4.2", note = "Replaced with `ascii::tab`")]
63#[inline(always)]
64pub fn tab<I, Error: ParseError<I>>(input: I) -> IResult<I, char, Error>
65where
66 I: StreamIsPartial,
67 I: Stream,
68 <I as Stream>::Token: AsChar + Copy,
69{
70 ascii::tab.parse_next(input)
71}
72
73/// Deprecated, replaced by [`ascii::alpha0`]
74#[deprecated(since = "0.4.2", note = "Replaced with `ascii::alpha0`")]
75#[inline(always)]
76pub fn alpha0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
77where
78 I: StreamIsPartial,
79 I: Stream,
80 <I as Stream>::Token: AsChar,
81{
82 ascii::alpha0.parse_next(input)
83}
84
85/// Deprecated, replaced by [`ascii::alpha1`]
86#[deprecated(since = "0.4.2", note = "Replaced with `ascii::alpha1`")]
87#[inline(always)]
88pub fn alpha1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
89where
90 I: StreamIsPartial,
91 I: Stream,
92 <I as Stream>::Token: AsChar,
93{
94 ascii::alpha1.parse_next(input)
95}
96
97/// Deprecated, replaced by [`ascii::digit0`]
98#[deprecated(since = "0.4.2", note = "Replaced with `ascii::digit0`")]
99#[inline(always)]
100pub fn digit0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
101where
102 I: StreamIsPartial,
103 I: Stream,
104 <I as Stream>::Token: AsChar,
105{
106 ascii::digit0.parse_next(input)
107}
108
109/// Deprecated, replaced by [`ascii::digit1`]
110#[deprecated(since = "0.4.2", note = "Replaced with `ascii::digit1`")]
111#[inline(always)]
112pub fn digit1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
113where
114 I: StreamIsPartial,
115 I: Stream,
116 <I as Stream>::Token: AsChar,
117{
118 ascii::digit1.parse_next(input)
119}
120
121/// Deprecated, replaced by [`ascii::hex_digit0`]
122#[deprecated(since = "0.4.2", note = "Replaced with `ascii::hex_digit0`")]
123#[inline(always)]
124pub fn hex_digit0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
125where
126 I: StreamIsPartial,
127 I: Stream,
128 <I as Stream>::Token: AsChar,
129{
130 ascii::hex_digit0.parse_next(input)
131}
132
133/// Deprecated, replaced by [`ascii::hex_digit1`]
134#[deprecated(since = "0.4.2", note = "Replaced with `ascii::hex_digit1`")]
135#[inline(always)]
136pub fn hex_digit1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
137where
138 I: StreamIsPartial,
139 I: Stream,
140 <I as Stream>::Token: AsChar,
141{
142 ascii::hex_digit1.parse_next(input)
143}
144
145/// Deprecated, replaced by [`ascii::oct_digit0`]
146#[deprecated(since = "0.4.2", note = "Replaced with `ascii::oct_digit0`")]
147#[inline(always)]
148pub fn oct_digit0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
149where
150 I: StreamIsPartial,
151 I: Stream,
152 <I as Stream>::Token: AsChar,
153{
154 ascii::oct_digit0.parse_next(input)
155}
156
157/// Deprecated, replaced by [`ascii::oct_digit1`]
158#[deprecated(since = "0.4.2", note = "Replaced with `ascii::oct_digit1`")]
159#[inline(always)]
160pub fn oct_digit1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
161where
162 I: StreamIsPartial,
163 I: Stream,
164 <I as Stream>::Token: AsChar,
165{
166 ascii::oct_digit0.parse_next(input)
167}
168
169/// Deprecated, replaced by [`ascii::alphanumeric0`]
170#[deprecated(since = "0.4.2", note = "Replaced with `ascii::alphanumeric0`")]
171#[inline(always)]
172pub fn alphanumeric0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
173where
174 I: StreamIsPartial,
175 I: Stream,
176 <I as Stream>::Token: AsChar,
177{
178 ascii::alphanumeric0.parse_next(input)
179}
180
181/// Deprecated, replaced by [`ascii::alphanumeric1`]
182#[deprecated(since = "0.4.2", note = "Replaced with `ascii::alphanumeric1`")]
183#[inline(always)]
184pub fn alphanumeric1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
185where
186 I: StreamIsPartial,
187 I: Stream,
188 <I as Stream>::Token: AsChar,
189{
190 ascii::alphanumeric1.parse_next(input)
191}
192
193/// Deprecated, replaced by [`ascii::space0`]
194#[deprecated(since = "0.4.2", note = "Replaced with `ascii::space0`")]
195#[inline(always)]
196pub fn space0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
197where
198 I: StreamIsPartial,
199 I: Stream,
200 <I as Stream>::Token: AsChar + Copy,
201{
202 ascii::space0.parse_next(input)
203}
204
205/// Deprecated, replaced by [`ascii::space1`]
206#[deprecated(since = "0.4.2", note = "Replaced with `ascii::space1`")]
207#[inline(always)]
208pub fn space1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
209where
210 I: StreamIsPartial,
211 I: Stream,
212 <I as Stream>::Token: AsChar + Copy,
213{
214 ascii::space1.parse_next(input)
215}
216
217/// Deprecated, replaced by [`ascii::multispace0`]
218#[deprecated(since = "0.4.2", note = "Replaced with `ascii::multispace0`")]
219#[inline(always)]
220pub fn multispace0<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
221where
222 I: StreamIsPartial,
223 I: Stream,
224 <I as Stream>::Token: AsChar + Copy,
225{
226 ascii::multispace0.parse_next(input)
227}
228
229/// Deprecated, replaced by [`ascii::multispace1`]
230#[deprecated(since = "0.4.2", note = "Replaced with `ascii::multispace1`")]
231#[inline(always)]
232pub fn multispace1<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>
233where
234 I: StreamIsPartial,
235 I: Stream,
236 <I as Stream>::Token: AsChar + Copy,
237{
238 ascii::multispace1.parse_next(input)
239}
240
241/// Deprecated, replaced by [`ascii::dec_uint`]
242#[deprecated(since = "0.4.2", note = "Replaced with `ascii::dec_uint`")]
243#[inline(always)]
244pub fn dec_uint<I, O, E: ParseError<I>>(input: I) -> IResult<I, O, E>
245where
246 I: StreamIsPartial,
247 I: Stream,
248 <I as Stream>::Token: AsChar + Copy,
249 O: Uint,
250{
251 ascii::dec_uint.parse_next(input)
252}
253
254pub use ascii::Uint;
255
256/// Deprecated, replaced by [`ascii::dec_int`]
257#[deprecated(since = "0.4.2", note = "Replaced with `ascii::dec_int`")]
258#[inline(always)]
259pub fn dec_int<I, O, E: ParseError<I>>(input: I) -> IResult<I, O, E>
260where
261 I: StreamIsPartial,
262 I: Stream,
263 <I as Stream>::Token: AsChar + Copy,
264 O: Int,
265{
266 ascii::dec_int.parse_next(input)
267}
268
269pub use ascii::Int;
270
271/// Deprecated, replaced by [`ascii::hex_uint`]
272#[deprecated(since = "0.4.2", note = "Replaced with `ascii::hex_uint`")]
273#[inline(always)]
274pub fn hex_uint<I, O, E: ParseError<I>>(input: I) -> IResult<I, O, E>
275where
276 I: StreamIsPartial,
277 I: Stream,
278 O: HexUint,
279 <I as Stream>::Token: AsChar,
280 <I as Stream>::Slice: AsBStr,
281{
282 ascii::hex_uint.parse_next(input)
283}
284
285pub use ascii::HexUint;
286
287/// Deprecated, replaced by [`ascii::float`]
288#[deprecated(since = "0.4.2", note = "Replaced with `ascii::float`")]
289#[inline(always)]
290pub fn float<I, O, E: ParseError<I>>(input: I) -> IResult<I, O, E>
291where
292 I: StreamIsPartial,
293 I: Stream,
294 I: Offset + Compare<&'static str>,
295 <I as Stream>::Slice: ParseSlice<O>,
296 <I as Stream>::Token: AsChar + Copy,
297 <I as Stream>::IterOffsets: Clone,
298 I: AsBStr,
299 &'static str: ContainsToken<<I as Stream>::Token>,
300{
301 ascii::float.parse_next(input)
302}
303
304/// Deprecated, replaced by [`ascii::escaped`]
305#[deprecated(since = "0.4.2", note = "Replaced with `ascii::escaped`")]
306#[inline(always)]
307pub fn escaped<'a, I: 'a, Error, F, G, O1, O2>(
308 normal: F,
309 control_char: char,
310 escapable: G,
311) -> impl Parser<I, <I as Stream>::Slice, Error>
312where
313 I: StreamIsPartial,
314 I: Stream + Offset,
315 <I as Stream>::Token: crate::stream::AsChar,
316 F: Parser<I, O1, Error>,
317 G: Parser<I, O2, Error>,
318 Error: ParseError<I>,
319{
320 ascii::escaped(normal, control_char, escapable)
321}
322
323#[cfg(feature = "alloc")]
324/// Deprecated, replaced by [`ascii::escaped_transform`]
325#[deprecated(since = "0.4.2", note = "Replaced with `ascii::escaped_transform`")]
326#[inline(always)]
327pub fn escaped_transform<I, Error, F, G, Output>(
328 normal: F,
329 control_char: char,
330 transform: G,
331) -> impl Parser<I, Output, Error>
332where
333 I: StreamIsPartial,
334 I: Stream + Offset,
335 <I as Stream>::Token: crate::stream::AsChar,
336 Output: crate::stream::Accumulate<<I as Stream>::Slice>,
337 F: Parser<I, <I as Stream>::Slice, Error>,
338 G: Parser<I, <I as Stream>::Slice, Error>,
339 Error: ParseError<I>,
340{
341 ascii::escaped_transform(normal, control_char, transform)
342}
343