Lines Matching defs:error

58     /// then return an error.
70 x => Err(p.error(*x.span(), ast::ErrorKind::ClassEscapeInvalid)),
79 /// dot), then return an error.
88 x => Err(p.error(*x.span(), ast::ErrorKind::ClassRangeLiteral)),
157 /// groups), then an error is returned by the parser.
172 /// Note that a nest limit of `0` will return a nest limit error for most
191 /// make good error messages harder. That is, in PCRE based regex engines,
194 /// be supported. Therefore, when octal support is disabled, the error
232 /// exceeds this number, then an error is returned.
235 /// return an error helpfully pointing out that backreferences are not
252 /// capture names and report an error if one is detected.
354 /// invocation returned an error and the parser is reused).
382 /// Create a new error with the given span and error type.
383 fn error(&self, span: Span, kind: ast::ErrorKind) -> ast::Error {
415 /// If the capture limit is exceeded, then an error is returned.
419 self.error(span, ast::ErrorKind::CaptureLimitExceeded)
426 /// already been used, then an error is returned.
436 Ok(i) => Err(self.error(
675 /// If there was a problem parsing the start of the group, then an error
716 /// If no such group could be popped, then an unopened group error is
735 return Err(self.error(
743 .error(self.span_char(), ast::ErrorKind::GroupUnopened));
767 /// error.
783 self.error(group.span, ast::ErrorKind::GroupUnclosed)
800 Err(self.error(group.span, ast::ErrorKind::GroupUnclosed))
810 /// If there was a problem parsing the opening of the class, then an error
841 /// then an error is returned.
887 /// Return an "unclosed class" error whose span points to the most
895 return self.error(set.span, ast::ErrorKind::ClassUnclosed);
1036 self.error(self.span(), ast::ErrorKind::RepetitionMissing)
1043 self.error(self.span(), ast::ErrorKind::RepetitionMissing)
1088 self.error(self.span(), ast::ErrorKind::RepetitionMissing)
1095 self.error(self.span(), ast::ErrorKind::RepetitionMissing)
1101 return Err(self.error(
1113 return Err(self.error(
1120 return Err(self.error(
1137 return Err(self.error(
1152 self.error(op_span, ast::ErrorKind::RepetitionCountInvalid)
1181 /// error is returned.
1184 /// corresponding error is returned.
1192 return Err(self.error(
1209 self.error(open_span, ast::ErrorKind::GroupUnclosed)
1219 return Err(self.error(
1259 .error(self.span(), ast::ErrorKind::GroupNameUnexpectedEof));
1267 return Err(self.error(
1279 .error(self.span(), ast::ErrorKind::GroupNameUnexpectedEof));
1285 return Err(self.error(
1306 /// If any flags are duplicated, then an error is returned.
1308 /// If the negation operator is used more than once, then an error is
1312 /// by any flags, then an error is returned.
1325 return Err(self.error(
1339 return Err(self.error(
1349 self.error(self.span(), ast::ErrorKind::FlagUnexpectedEof)
1354 return Err(self.error(span, ast::ErrorKind::FlagDanglingNegation));
1364 /// If the flag is not recognized, then an error is returned.
1376 .error(self.span_char(), ast::ErrorKind::FlagUnrecognized))
1437 return Err(self.error(
1447 return Err(self.error(
1457 return Err(self.error(
1523 _ => Err(self.error(span, ast::ErrorKind::EscapeUnrecognized)),
1581 self.error(self.span(), ast::ErrorKind::EscapeUnexpectedEof)
1613 .error(self.span(), ast::ErrorKind::EscapeUnexpectedEof));
1616 return Err(self.error(
1629 None => Err(self.error(
1659 return Err(self.error(
1667 return Err(self.error(
1678 return Err(self.error(
1684 None => Err(self.error(
1704 /// the complete set of digits into a u32, then an error is returned.
1723 return Err(self.error(span, ast::ErrorKind::DecimalEmpty));
1727 None => Err(self.error(span, ast::ErrorKind::DecimalInvalid)),
1803 /// a simple literal is expected (e.g., in a range), then an error is
1836 self.error(range.span, ast::ErrorKind::ClassRangeInvalid)
1850 /// Note that it is the caller's responsibility to report an error if an
1882 /// An error is returned if EOF is found.
1890 return Err(self.error(
1900 return Err(self.error(
1917 return Err(self.error(
1932 return Err(self.error(
1960 // because parsing cannot fail with any interesting error. For example,
1970 // should return an error instead since the repeated colons give away
2038 self.error(self.span(), ast::ErrorKind::EscapeUnexpectedEof)
2048 .error(self.span(), ast::ErrorKind::EscapeUnexpectedEof));
2088 return Err(self.error(
2126 /// exceeds the specified nesting limit. If it does, then an error is returned.
2147 self.p.error(
2154 return Err(self.p.error(
2279 /// When the result is an error, transforms the ast::ErrorKind from the source
2280 /// Result into another one. This function is used to return clearer error