diff options
| author | Martin Haug <mhaug@live.de> | 2021-11-08 12:01:35 +0100 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2021-11-08 12:01:35 +0100 |
| commit | 9141cba6a9db6ae3106e39d92508cb91c390049b (patch) | |
| tree | 237c990649424ce32b5f0e03d50c74935eede2fa /src/parse/parser.rs | |
| parent | 0663758fbb42651a08bfcd46c27b5cdeab90fb75 (diff) | |
Deal with the effects of keywords
Diffstat (limited to 'src/parse/parser.rs')
| -rw-r--r-- | src/parse/parser.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 451e18f1..31c918a8 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -95,6 +95,12 @@ impl<'s> Parser<'s> { output } + /// End the parsing process and return multiple children, even if there + /// remains stuff in the string. + pub fn eject_partial(self) -> Option<Vec<Green>> { + self.group_success().then(|| self.children) + } + /// Whether the end of the source string or group is reached. pub fn eof(&self) -> bool { self.eof |
