MCPcopy Create free account
hub / github.com/microsoft/typescript-go / NodeIsMissing

Function NodeIsMissing

internal/ast/utilities.go:66–68  ·  view source on GitHub ↗

Determines if a node is missing (either `nil` or empty)

(node *Node)

Source from the content-addressed store, hash-verified

64
65// Determines if a node is missing (either `nil` or empty)
66func NodeIsMissing(node *Node) bool {
67 return node == nil || node.Loc.Pos() == node.Loc.End() && node.Loc.Pos() >= 0 && node.Kind != KindEndOfFile
68}
69
70// Determines if a node is present
71func NodeIsPresent(node *Node) bool {

Calls 2

PosMethod · 0.65
EndMethod · 0.65

Tested by

no test coverage detected