sun::debug::ScopeTreeGenerator
class · Source (opens in a new tab)
class sun::debug::ScopeTreeGeneratorGenerates an interactive HTML visualization of the semantic scope tree.
Usage: ScopeTreeGenerator gen; std::string html = gen.generateHtml(rootScope);
Public Functions
generateHtml
public · function · Source (opens in a new tab)
std::string sun::debug::ScopeTreeGenerator::generateHtml(const sun::semantic_analysis::SemanticScope &root)Generate HTML representation of the entire scope tree.
Related: sun::semantic_analysis::SemanticScope
Private Functions
escapeJson
private · function · static · Source (opens in a new tab)
std::string sun::debug::ScopeTreeGenerator::escapeJson(const std::string &s)Escape special characters for JSON strings.
generateJson
private · function · Source (opens in a new tab)
std::string sun::debug::ScopeTreeGenerator::generateJson(const sun::semantic_analysis::SemanticScope &scope, int indent=0)Generate JSON representation of a scope (recursive).
Related: sun::semantic_analysis::SemanticScope
getHtmlTemplate
private · function · static · Source (opens in a new tab)
std::string sun::debug::ScopeTreeGenerator::getHtmlTemplate()Get the HTML template with embedded CSS and JavaScript.
scopeTypeToString
private · function · static · Source (opens in a new tab)
std::string sun::debug::ScopeTreeGenerator::scopeTypeToString(sun::semantic_analysis::ScopeType type)Convert ScopeType enum to string.
Related: sun::semantic_analysis::ScopeType, ScopeType
Private Fields
out
private · variable · Source (opens in a new tab)
std::stringstream sun::debug::ScopeTreeGenerator::outNo documentation comment.