| 6398 | } |
| 6399 | |
| 6400 | void GDScriptParser::TreePrinter::print_tree(const GDScriptParser &p_parser) { |
| 6401 | ClassNode *class_tree = p_parser.get_tree(); |
| 6402 | ERR_FAIL_NULL_MSG(class_tree, "Parse the code before printing the parse tree."); |
| 6403 | |
| 6404 | if (p_parser.is_tool()) { |
| 6405 | push_line("@tool"); |
| 6406 | } |
| 6407 | if (!class_tree->icon_path.is_empty()) { |
| 6408 | push_text(R"(@icon (")"); |
| 6409 | push_text(class_tree->icon_path); |
| 6410 | push_line("\")"); |
| 6411 | } |
| 6412 | print_class(class_tree); |
| 6413 | |
| 6414 | print_line(String(printed)); |
| 6415 | } |
| 6416 | |
| 6417 | #endif // DEBUG_ENABLED |