sh
sh copied to clipboard
syntax: document which nil-able fields cannot be nil
For example, ParamExp
has a Name
field of type *Lit
, but it can never be nil. The reason it's a pointer is for consistency with all the other literal fields.
There also seem to be fields that can be nil
even though they don't look like it. For example, this code checks Stmt.Cmd
for nil
, which I (with no experience in Go) would've guessed can't be nil
. It would be amazing to have all of that clearly documented :)