Data Structures in the Fleet Editor
For my own editor, for syntax highlighting, instead of storing any part of an AST, I&#x27;m working on instead storing the starting state of Rouge&#x27;s lexers at fixed intervals. It means restarting the syntax highlighting shortly before the point of a change and running it only for the minimal number of lines until the state again matches the old state is trivial. Most of the time, the full state at the beginning of a line is just a single symbol.<p>If you want&#x2F;need the AST for other analysis I guess it might be worth doing something more complex there. For my use it mattered more to keep the editor minimal.