stefnotch / aftermath-editor

A WYSIWYG mathematics editor that understands your formulas!
https://stefnotch.github.io/aftermath-editor
MIT License
14 stars 0 forks source link

MathIR and Zippers and MathLayout #14

Closed stefnotch closed 1 year ago

stefnotch commented 1 year ago

think about how editing the tree would work. We have to update every single zipper whenever we do edits, right?

MathLayout: For editing, things that the user chooses like "this is a bracket and that is an absolute value sign" belong here

MathIR: The on-the-fly parsed data that tells me how to ideally render a given MathLayout, how to turn it into MathJson, and how to do advanced editing features like "delete word" (write "1+234" and put caret at end. Then shift+backspace deletes "234")

stefnotch commented 1 year ago

Done, we now have a syntax tree (which is our MathIR)