diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-08-29 12:02:07 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-08-29 12:02:07 +0200 |
| commit | 236750c35fbad916b63774df917cbc436f1d1a8c (patch) | |
| tree | c6e837da340f50ad64bf182d676e7228c044f08d /src/syntax/tree.rs | |
| parent | 6febc0327304451bc956985b7cadb07a0b563c79 (diff) | |
Remove par nodes in favor of parbreaks 🔄
This basically reverts the earlier change from parbreaks to par nodes because:
- It is simpler and less nested
- It works way better with functions that layout their body inline like `font`, which where buggy before, previously
The original reasons for changing to par nodes were:
- the envisioned design of the layouter at that time (based on dynamic nodes etc.), which is not relevant anymore
- possibly existing benefits with regards to incremental compilation, which are unsure and outweighed by the immediate benefits of the parbreak-representation
Diffstat (limited to 'src/syntax/tree.rs')
| -rw-r--r-- | src/syntax/tree.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax/tree.rs b/src/syntax/tree.rs index ae2e9892..31f334d2 100644 --- a/src/syntax/tree.rs +++ b/src/syntax/tree.rs @@ -23,6 +23,8 @@ pub enum SyntaxNode { Spacing, /// A forced line break. Linebreak, + /// A paragraph break. + Parbreak, /// Italics were enabled / disabled. ToggleItalic, /// Bolder was enabled / disabled. @@ -31,8 +33,6 @@ pub enum SyntaxNode { Text(String), /// Lines of raw text. Raw(Vec<String>), - /// A paragraph of child nodes. - Par(SyntaxTree), /// A function call. Call(CallExpr), } |
