MajeedKazemi / code-struct

A new text-based environment that helps beginners transition into conventional text-based programming environments.
http://code-struct.vercel.app
GNU General Public License v3.0
27 stars 10 forks source link

Expressions on empty lines #483

Open vicchig opened 3 years ago

vicchig commented 3 years ago

We allow these types of modifiers to be inserted on empty lines. @MajeedKazemi is that intended?

And if it is intentional, then I guess we should offer these as suggestions to fix #480? I am currently only allowing assignment modifiers to serve as a valid fix.

image

vicchig commented 3 years ago

I guess we can allow them, but it would probably be good to add a warning to them saying that the statement has no effect.

MajeedKazemi commented 3 years ago

hmm, I didn't know that we could do these kind of insertions. I personally believe that this should not happen.

vicchig commented 3 years ago

Yes, same. What about variable references on empty lines? I think allowing those is ok and draft mode makes sense for them as well. Those can always be turned to at least an assignment statement.