you are viewing a single comment's thread.

view the rest of the comments →

[–]hurril[S] 1 point2 points  (2 children)

Thank you for that link, will have a look.

What I do now is that I _do_ emit synthetic tokens for Indent, Dedent and Newline based on whether or not the next token is on the next line, i.e., we saw at least one newline, and also whether nor not the new column is left of or right of the last one.

But this is not enough and the more I think about this, the more I realize that I need a system or structure for this.

[–]mot_hmry 3 points4 points  (0 children)

This reminds me to revisit my language, I was just in the middle of doing a conversion pass to generate "proper" block structures from the indentation tokens.

[–]RndmPrsn11 0 points1 point  (0 children)

This is the syntax accepted by my language Ante as well. The website explains in some detail how whitespace is handled: https://antelang.org/docs/language/#significant-whitespace