increase property
- @Deprecated('Use `during` instead to properly track the indentation state')
latefinal
Parser that increases the indentation.
The parser performs the following actions in sequence:
- verifies that the new indentation is deeper than the previous one,
- pushes the previous indentation to the stack,
- updates the current indentation with the new one, and
- returns the new indentation without consuming it.
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<String> increase = parser
.plusString(message: message)
.where((value) {
if (value.startsWith(current) && value.length > current.length) {
stack.add(current);
current = value;
return true;
} else {
return false;
}
})
.and();