Looking at the Go AST documentation, I don't see any node type to represent a nil
in the code. BasicLit doesn't cover it in the list of token types it accepts, and in fact when I look at the source to go/token
I don't see a nil
token at all!
If I want to create an AST of the form if x != nil
, how do I do the nil
?