diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-08-17 16:25:09 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-08-17 16:25:09 +0200 |
| commit | 3cbca56a7195bb2a7996530d584300d697c11dc8 (patch) | |
| tree | 2a9242442bb79ae4b70895cabeb95b7aff2a4f5d /src/layout/tree.rs | |
| parent | 8a80503188804d576636265e71f72e9f55a7961a (diff) | |
Parse braced expressions and bracketed calls in headers 🗳
- Refactors the tokenizer to be lazy: It does not emit pre-parsed function tokens, but instead allows it's mode to be changed. The modes are tracked on a stack to allow nested compute/typesetting (pop/push).
- Introduces delimited groups into the parser, which make it easy to parse delimited expressions without handling the delimiters in the parsing code for the group's content. A group is started with `start_group`. When reaching the group's end (matching delimiter) the eat and peek methods will simply return `None` instead of the delimiter, stopping the content parser and bubbling up the call stack until `end_group` is called to clear up the situation.
Diffstat (limited to 'src/layout/tree.rs')
| -rw-r--r-- | src/layout/tree.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/tree.rs b/src/layout/tree.rs index 39e111bd..092ba582 100644 --- a/src/layout/tree.rs +++ b/src/layout/tree.rs @@ -123,7 +123,7 @@ impl<'a> TreeLayouter<'a> { ..self.ctx }).await; - self.feedback.extend_offset(pass.feedback, call.span.start); + self.feedback.extend(pass.feedback); if let Value::Commands(commands) = pass.output { for command in commands { |
