{ "ast": { "items": [ { "use": { "tree": { "path": { "ident": "crate", "tree": { "path": { "ident": "extractor", "tree": { "path": { "ident": "types", "tree": { "ident": "CodeSnippet" } } } } } } } } }, { "use": { "tree": { "path": { "ident": "dioxus", "tree": { "path": { "ident": "prelude", "tree": "*" } } } } } }, { "use": { "tree": { "path": { "ident": "std", "tree": { "path": { "ident": "collections", "tree": { "ident": "HashSet" } } } } } } }, { "fn": { "ident": "get_snippet_id", "inputs": [ { "typed": { "pat": { "ident": { "ident": "file_name" } }, "ty": { "reference": { "elem": { "path": { "segments": [ { "ident": "str" } ] } } } } } }, { "typed": { "pat": { "ident": { "ident": "snippet_idx" } }, "ty": { "path": { "segments": [ { "ident": "usize" } ] } } } } ], "output": { "path": { "segments": [ { "ident": "String" } ] } }, "stmts": [ { "expr": [ { "macro": { "delimiter": "paren", "path": { "segments": [ { "ident": "format" } ] }, "tokens": [ { "lit": "\"{}_{}\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "file_name" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "snippet_idx" } ] } }, false ] } ] } }, { "fn": { "attrs": [ { "meta": { "path": { "segments": [ { "ident": "component" } ] } }, "style": "outer" } ], "ident": "CodeSnippetComponent", "inputs": [ { "typed": { "pat": { "ident": { "ident": "snippet" } }, "ty": { "path": { "segments": [ { "ident": "CodeSnippet" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "file_name" } }, "ty": { "path": { "segments": [ { "ident": "String" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "idx" } }, "ty": { "path": { "segments": [ { "ident": "usize" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "copied_snippets" } }, "ty": { "path": { "segments": [ { "arguments": { "angle_bracketed": { "args": [ { "type": { "path": { "segments": [ { "arguments": { "angle_bracketed": { "args": [ { "type": { "path": { "segments": [ { "ident": "String" } ] } } } ] } }, "ident": "HashSet" } ] } } } ] } }, "ident": "Signal" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "copy_to_clipboard" } }, "ty": { "path": { "segments": [ { "arguments": { "angle_bracketed": { "args": [ { "type": { "tuple": { "elems": [ { "path": { "segments": [ { "ident": "String" } ] } }, { "path": { "segments": [ { "ident": "String" } ] } } ] } } } ] } }, "ident": "EventHandler" } ] } } } } ], "output": { "path": { "segments": [ { "ident": "Element" } ] } }, "stmts": [ { "let": { "init": { "expr": { "call": { "args": [ { "reference": { "expr": { "path": { "segments": [ { "ident": "file_name" } ] } } } }, { "path": { "segments": [ { "ident": "idx" } ] } } ], "func": { "path": { "segments": [ { "ident": "get_snippet_id" } ] } } } } }, "pat": { "ident": { "ident": "snippet_id" } } } }, { "macro": { "delimiter": "brace", "path": { "segments": [ { "ident": "rsx" } ] }, "tokens": [ { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-container\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "key" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"{idx}\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-header\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "span" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"🏷️ {snippet.language} (lines {snippet.line_start}-{snippet.line_end})\"" } ] } }, { "ident": "button" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "ident": "if" }, { "ident": "copied_snippets" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "read" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "contains" }, { "group": { "delimiter": "parenthesis", "stream": [ { "punct": { "op": "&", "spacing": "alone" } }, { "ident": "snippet_id" } ] } }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"copy-btn copied\"" } ] } }, { "ident": "else" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"copy-btn\"" } ] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "onclick" }, { "punct": { "op": ":", "spacing": "alone" } }, { "ident": "move" }, { "punct": { "op": "|", "spacing": "alone" } }, { "ident": "_" }, { "punct": { "op": "|", "spacing": "alone" } }, { "ident": "copy_to_clipboard" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "call" }, { "group": { "delimiter": "parenthesis", "stream": [ { "group": { "delimiter": "parenthesis", "stream": [ { "ident": "snippet" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "content" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "snippet_id" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } } ] } } ] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "if" }, { "ident": "copied_snippets" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "read" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "contains" }, { "group": { "delimiter": "parenthesis", "stream": [ { "punct": { "op": "&", "spacing": "alone" } }, { "ident": "snippet_id" } ] } }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"✅ Copied!\"" } ] } }, { "ident": "else" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"📋 Copy\"" } ] } } ] } } ] } }, { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-content\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "pre" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-code\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "lit": "\"{snippet.content}\"" } ] } } ] } } ] } } ] } } ], "vis": "pub" } }, { "fn": { "attrs": [ { "meta": { "path": { "segments": [ { "ident": "component" } ] } }, "style": "outer" } ], "ident": "CodeSnippetView", "inputs": [ { "typed": { "pat": { "ident": { "ident": "snippet" } }, "ty": { "path": { "segments": [ { "ident": "CodeSnippet" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "snippet_id" } }, "ty": { "path": { "segments": [ { "ident": "String" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "is_copied" } }, "ty": { "path": { "segments": [ { "ident": "bool" } ] } } } }, { "typed": { "pat": { "ident": { "ident": "on_copy" } }, "ty": { "path": { "segments": [ { "arguments": { "angle_bracketed": { "args": [ { "type": { "tuple": { "elems": [ { "path": { "segments": [ { "ident": "String" } ] } }, { "path": { "segments": [ { "ident": "String" } ] } } ] } } } ] } }, "ident": "EventHandler" } ] } } } } ], "output": { "path": { "segments": [ { "ident": "Element" } ] } }, "stmts": [ { "macro": { "delimiter": "brace", "path": { "segments": [ { "ident": "rsx" } ] }, "tokens": [ { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-container\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-header\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "span" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"🏷️ {snippet.language} (lines {snippet.line_start}-{snippet.line_end})\"" } ] } }, { "ident": "button" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "ident": "if" }, { "ident": "is_copied" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"copy-btn copied\"" } ] } }, { "ident": "else" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"copy-btn\"" } ] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "onclick" }, { "punct": { "op": ":", "spacing": "alone" } }, { "group": { "delimiter": "brace", "stream": [ { "ident": "let" }, { "ident": "content" }, { "punct": { "op": "=", "spacing": "alone" } }, { "ident": "snippet" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "content" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ";", "spacing": "alone" } }, { "ident": "let" }, { "ident": "id" }, { "punct": { "op": "=", "spacing": "alone" } }, { "ident": "snippet_id" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ";", "spacing": "alone" } }, { "ident": "move" }, { "punct": { "op": "|", "spacing": "alone" } }, { "ident": "_" }, { "punct": { "op": "|", "spacing": "alone" } }, { "ident": "on_copy" }, { "group": { "delimiter": "parenthesis", "stream": [ { "group": { "delimiter": "parenthesis", "stream": [ { "ident": "content" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "id" }, { "punct": { "op": ".", "spacing": "alone" } }, { "ident": "clone" }, { "group": { "delimiter": "parenthesis", "stream": [] } } ] } } ] } } ] } }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "if" }, { "ident": "is_copied" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"✅ Copied!\"" } ] } }, { "ident": "else" }, { "group": { "delimiter": "brace", "stream": [ { "lit": "\"📋 Copy\"" } ] } } ] } } ] } }, { "ident": "div" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-content\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "ident": "pre" }, { "group": { "delimiter": "brace", "stream": [ { "ident": "class" }, { "punct": { "op": ":", "spacing": "alone" } }, { "lit": "\"snippet-code\"" }, { "punct": { "op": ",", "spacing": "alone" } }, { "lit": "\"{snippet.content}\"" } ] } } ] } } ] } } ] } } ], "vis": "pub" } } ] }, "file_path": "src\\extractor\\components\\codesnippet.rs", "summary": { "emoji_counts_in_strings": { "✅": 2, "️": 2, "🏷": 2, "📋": 2 }, "string_literals": [ "\"{}_{}\"", "\"snippet-container\"", "\"{idx}\"", "\"snippet-header\"", "\"🏷️ {snippet.language} (lines {snippet.line_start}-{snippet.line_end})\"", "\"copy-btn copied\"", "\"copy-btn\"", "\"✅ Copied!\"", "\"📋 Copy\"", "\"snippet-content\"", "\"snippet-code\"", "\"{snippet.content}\"", "\"snippet-container\"", "\"snippet-header\"", "\"🏷️ {snippet.language} (lines {snippet.line_start}-{snippet.line_end})\"", "\"copy-btn copied\"", "\"copy-btn\"", "\"✅ Copied!\"", "\"📋 Copy\"", "\"snippet-content\"", "\"snippet-code\"", "\"{snippet.content}\"" ], "top_level_nodes": 1, "total_nodes": 458, "type_counts": { "angle_bracketed": 4, "args": 5, "arguments": 4, "attrs": 2, "call": 1, "delimiter": 38, "elem": 1, "elems": 2, "expr": 3, "fn": 3, "func": 1, "group": 35, "ident": 134, "init": 1, "inputs": 3, "items": 1, "let": 1, "lit": 22, "macro": 3, "meta": 2, "op": 53, "output": 3, "pat": 12, "path": 35, "punct": 53, "reference": 2, "segments": 28, "spacing": 53, "stmts": 3, "stream": 35, "style": 2, "tokens": 3, "tree": 10, "tuple": 2, "ty": 11, "type": 4, "typed": 11, "use": 3, "vis": 2 }, "word_counts": { "_": 1, "btn": 4, "code": 2, "container": 2, "content": 4, "copied": 4, "copy": 6, "header": 2, "idx": 1, "language": 2, "line_end": 2, "line_start": 2, "lines": 2, "snippet": 16 }, "word_emoji_counts": { "⬜": 1, "📦": 4 } }, "timestamp": 1751588207 }