decrease property

  1. @Deprecated('Use `during` instead to properly track the indentation state')
Parser<void> decrease
latefinal

Parser that decreases the indentation by one level.

Prefer using during instead to properly track the indentation state and ensure rollback on parse failure.

Implementation

@Deprecated('Use `during` instead to properly track the indentation state')
late final Parser<void> decrease = epsilon().where((_) {
  if (stack.isNotEmpty) {
    current = stack.removeLast();
    return true;
  } else {
    return false;
  }
});