Zomis / Brainduck

Brainfuck Interpreter in Java/Groovy, with a Groovy DSL
40 stars 1 forks source link

Editor enhancements #6

Closed Zomis closed 8 years ago

Zomis commented 9 years ago

Take a look at https://github.com/TomasMikula/RichTextFX/blob/master/richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/JavaKeywords.java and see what can be accomplished with syntax highlighting in Brainfuck.

Zomis commented 8 years ago

See how different IDEs handle something like ()((()()()))

Zomis commented 8 years ago

This is how IntelliJ works, which seems to be a good strategy to follow:

Highlight both before and after: ()((()()x())) Highlight after: ()(x(()()())) Highlight before: ()((()()())x)

That is, always highlight the innermost match. In case of a end before and a beginning after, highlight both.