bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.
BSD 3-Clause "New" or "Revised" License
1.12k stars 259 forks source link

Add a way to parse multiple lines instead of single lines #467

Open kortenkamp opened 2 years ago

kortenkamp commented 2 years ago

Describe the solution you'd like I would like to add syntax highlighting for a strange language that ignores whitespace, including newlines, in keywords and identifiers. Thus it is not possible to just parse single lines for syntax highlighting, but larger blocks.

Are there any workarounds? As it is very weird to span keywords over multiple lines using line breaks inside them, probably nobody cares if the syntax highlighting is wrong. So, a workaround would be to just ignore this.

Additional context I cannot find a way to do this – but maybe it is still possible and just lacks documentation? Also, I can create an AST using a parser of the whole file, and provide boundaries for code folding – so maybe it would be sufficient to just recreate the highlighting within the current fold?