waf / CSharpRepl

A command line C# REPL with syntax highlighting – explore the language, libraries and nuget packages interactively.
https://fuqua.io/CSharpRepl/
Mozilla Public License 2.0
2.76k stars 106 forks source link

Don't require a trailing semicolon for a complete single statement other than an expression #356

Open tats-u opened 5 months ago

tats-u commented 5 months ago

Version

C# REPL 0.6.6+ba21d409af4dce77f8be07f6a61cdb24cd19bb29

What happened?

jshell (Java's official REPL) can execute int i = 0; or try to evaluate return 0; or break; without the semicolon. Especially, I do not want to add ; after int i = 0. Without it, CSharpRepl will wait for an additional input unlike jshell.