You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a Block (the syntax module modules/block.rs) parses any positive amount of comments without any other statements, it does not insert a noop command :. Comments are not commands that Bash parses, so it omits all of them and looks for some command. If none found - it fails, which is an unwanted behaviour. To mitigate the problem, Bash developers use so called noop operator (:) that does nothing.
To Reproduce
Write a loop, if statement or function declaration with a block that only contains comment(s).
Expected behavior
Block
{
// Comment 1
// Comment 2
}
Should compile to
{
# Comment 1
# Comment 2
:
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When a Block (the syntax module
modules/block.rs
) parses any positive amount of comments without any other statements, it does not insert a noop command:
. Comments are not commands that Bash parses, so it omits all of them and looks for some command. If none found - it fails, which is an unwanted behaviour. To mitigate the problem, Bash developers use so called noop operator (:
) that does nothing.To Reproduce
Write a loop, if statement or function declaration with a block that only contains comment(s).
Expected behavior
Block
Should compile to
The text was updated successfully, but these errors were encountered: