| 1318 | /// sub-expression. |
| 1319 | #[derive(Clone, Debug, Eq, PartialEq)] |
| 1320 | pub struct Repetition { |
| 1321 | /// The kind of this repetition operator. |
| 1322 | pub kind: RepetitionKind, |
| 1323 | /// Whether this repetition operator is greedy or not. A greedy operator |
| 1324 | /// will match as much as it can. A non-greedy operator will match as |
| 1325 | /// little as it can. |
| 1326 | /// |
| 1327 | /// Typically, operators are greedy by default and are only non-greedy when |
| 1328 | /// a `?` suffix is used, e.g., `(expr)*` is greedy while `(expr)*?` is |
| 1329 | /// not. However, this can be inverted via the `U` "ungreedy" flag. |
| 1330 | pub greedy: bool, |
| 1331 | /// The expression being repeated. |
| 1332 | pub hir: Box<Hir>, |
| 1333 | } |
| 1334 | |
| 1335 | impl Repetition { |
| 1336 | /// Returns true if and only if this repetition operator makes it possible |
no outgoing calls
no test coverage detected