tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

Make semicolons optional #50

Closed tdenniston closed 9 years ago

tdenniston commented 9 years ago

One common observation about bish is that requiring semicolons and curly braces doesn't seem like "modern syntax." The original reason why I added those requirements was to make parsing easier. However, to make bish more attractive for shell scripting, semicolons should be optional.

Statement parsing should search either for a newline character or a semicolon. Thus, if one wants to write two statements on the same line, a semicolon can be used to separate them. Semicolons at the end of a line will be allowed, but serve no purpose.

(Note there is precedent in the swift language for this approach).