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/syntax/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/syntax/tree.rs')
0 files changed, 0 insertions, 0 deletions
