Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 AST 模块来解析源代码,并对其进行处理。但是,当我需要从其子节点返回父节点时,它并不存在。
您始终可以将父节点存储在堆中以备后用。