Commit graph

3 commits

Author SHA1 Message Date
Abhinav Gupta
ca5561990e NodeKind/String: Don't panic on unknown
NodeKind.String() will currently panic if called with an unknown
NodeKind.

This change verifies that the name of the NodeKind is known before
looking it up in kindNames. If the name is unknown, a generic
`NodeKind(N)` string representation is used.
2020-03-05 22:47:15 -08:00
Joe Schafer
3c340e9970 Fix ast.Walk to respect WalkStop
Fixes #97
2020-02-07 01:42:40 -08:00
xml
4fc27178e4 fix bug: if do c.SetNextSibling(nil) and c = c.NextSibling(). After remove the first child the var c is always nil.the next child will not be set nil 2020-01-09 17:33:21 +08:00