Comment

Comment by Treblemaker

Yes, according to the documentation, braces in comments should be ignored.

However, the parser is confused by unbalanced braces in comments.

Here's a classic case that turns up occasionally during development:

  proc asdf { args } {
    # if { first draft complex condition } {
    if { final simplified condition } {
      do something
    } else {
      do something else
    }
  }
Sourcing a file with the above comment inside the proc will produce:

  missing close-brace: possible unbalanced brace in comment
parent Treblemaker 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton