def get_symbol_matches_from_parse(symbol,parse):
matches = []
if "symbol_type" in parse:
if parse["symbol_type"] == symbol:
matches.append(parse)
if "children" in parse:
for child in parse["children"]:
child_matches = get_symbol_matches_from_parse(symbol,child)
matches += child_matches
return matches
评论列表
文章目录