larsbrinkhoff / forth-mode

Wants to be the SLIME of Forth
GNU General Public License v3.0
61 stars 17 forks source link

Basic indentation of control structures #18

Closed ellerh closed 7 years ago

ellerh commented 7 years ago

This adds basic support for indentation. I don't know if the smie framework is a good fit for Forth but so far it is nice and short. One problem I don't know how support are things like postpone if which currently mess up everything.

larsbrinkhoff commented 7 years ago

I don't use indentation much in Forth, so I'm grateful someone else cares about this.

Parsing words like POSTPONE of course are a big problem for syntax analysis. I have a vague idea that a tighter integration with the Forth interpreter can solve this. See #16.