source_file
block_comment
/* "/*"
*/ "*/"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " Renders every fixture's `human_mapping.json` (see `src/bin/"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " read-only HTML page - two side-by-side before/after trees w"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " matched/deleted/inserted annotations baked in as `data-*` a"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " cross-panel navigation, and a \"file an issue\" button - all "...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " JS file (`assets/mapping_site/viewer.js`), no framework, no"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " GitHub Pages by `.github/workflows/pages.yml`; nothing this"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " repo.\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment "\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " This is purely for humans to review and discuss what the gr"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " be - it never runs codediff's own diff or compares against "...
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "collections"
:: "::"
identifier "HashMap"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "std"
:: "::"
identifier "fs"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "path"
:: "::"
identifier "PathBuf"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "anyhow"
:: "::"
use_list
{ "{"
identifier "Context"
, ","
identifier "Result"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "clap"
:: "::"
identifier "Parser"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "tree_sitter"
:: "::"
identifier "Node"
; ";"
use_declaration
use "use"
scoped_use_list
scoped_identifier
identifier "codediff"
:: "::"
identifier "code"
:: "::"
use_list
{ "{"
identifier "Code"
, ","
identifier "Language"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "codediff"
:: "::"
identifier "diff"
:: "::"
identifier "NodeCache"
; ";"
use_declaration
use "use"
scoped_use_list
scoped_identifier
scoped_identifier
identifier "codediff"
:: "::"
identifier "diff"
:: "::"
identifier "text"
:: "::"
use_list
{ "{"
identifier "RangeMatch"
, ","
identifier "TextDiff"
, ","
identifier "TextOperation"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "codediff"
:: "::"
identifier "test"
:: "::"
identifier "helper"
; ";"
use_declaration (+50 nodes collapsed)
line_comment
// "//"
line_comment
// "//"
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "test"
) ")"
] "]"
use_declaration
use "use"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "codediff"
:: "::"
identifier "test"
:: "::"
identifier "helper"
:: "::"
identifier "human_mapping"
:: "::"
identifier "rebuild_caches"
; ";"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `owner/repo`, used both for the \"file an issue\" link (rewri"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the \"view source\" link below (baked in at generation time, "...
const_item
const "const"
identifier "REPO"
: ":"
reference_type
& "&"
primitive_type "str"
= "="
string_literal
" "\""
string_content "ivankovic/codediff"
" "\""
; ";"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Parser"
) ")"
] "]"
struct_item (+33 nodes collapsed)
function_item (+1093 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Where a fixture's two files were sampled from, resolved to "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The `url` is the commit the *after* side comes from - the b"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " single parent - so it opens on exactly the change this fixt"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `helper::SampleProvenance`.\n"
struct_item (+46 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One rendered fixture page, plus the one number the index wa"...
struct_item (+31 nodes collapsed)
function_item (+1744 nodes collapsed)
const_item
const "const"
identifier "HELP_OVERLAY_HTML"
: ":"
reference_type
& "&"
primitive_type "str"
= "="
raw_string_literal
string_content "<div id=\"help-overlay\" class=\"hidden\" role=\"dialog\" aria-lab"...
; ";"
const_item
const "const"
identifier "SEARCH_PROMPT_HTML"
: ":"
reference_type
& "&"
primitive_type "str"
= "="
raw_string_literal
string_content "<div id=\"search-prompt\" class=\"hidden\" role=\"dialog\" aria-la"...
; ";"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A fully-quiet subtree (see `fully_quiet_subtree_sizes`) big"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " from the HTML entirely (replaced with a one-line placeholde"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " collapsing via `<details>` without `open` still serializes "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " closed `<details>` is `display: none`, not \"absent\"), so on"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " either almost entirely untouched code around a small annota"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " matched node-for-node - collapsing alone still produced mul"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " 16MB). Small fully-quiet subtrees (at or under this size) s"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " default, so a reader can still drill into an ordinary short"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " hitting the placeholder wall constantly.\n"
const_item
const "const"
identifier "OMIT_THRESHOLD"
: ":"
primitive_type "usize"
= "="
integer_literal "20"
; ";"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Recursively renders `node` and its subtree. `side` is `'b'`"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " both as the id-namespace prefix (so before/after tree-sitte"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " value between the two independently-parsed trees, never col"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " half of `caches` every per-side lookup below reads from (`s"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `is_identical_before`/`_after`, `match_operation_before`/`_"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " each an `if side == 'b' { ... } else { ... }` inline, not a"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `fully_quiet_subtree_sizes`/`mark_fully_quiet` still take `"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " pointers (they have no `side` of their own to dispatch on -"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " that runs *before* `render_node`, over one side at a time),"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `side` is always in scope, so there is no reason for two di"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " function. `quiet_sizes` (see `fully_quiet_subtree_sizes`) m"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " subtree's node count; `force_open` overrides both the close"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " omit-with-placeholder treatment for `node` itself (but not "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " tree root fully rendered and open even on the rare fixture "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " quiet (otherwise the page would load empty or collapsed).\n"
function_item (+882 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Same convention as `human_solver`'s `node_label`: kind plus"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " (Rust-escaped) snippet of the node's own text.\n"
function_item (+140 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Whether `node` (given its already-computed `status`) is \"qu"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " insertion, and, if matched, actually `Identical` rather tha"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " paired (`Update`/`MatchButNotIdentical`, per `identical_fn`"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " annotated - most of a typical fixture) unconditionally, sin"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " a node in either state has nothing actively being edited at"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " actually needs to stay visible by default. Excludes `Marked"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " (exactly the content a reviewer needs to see) and a non-ide"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " just happens to still be pairable, e.g. a changed string li"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " never be swallowed into an \"unremarkable\" placeholder along"...
function_item (+106 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Maps a node's id to its subtree's node count (itself plus e"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " whose entire subtree is quiet (see `is_quiet`) - no deletio"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " anywhere inside it, whether because nothing was ever annota"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " it was explicitly confirmed matched *and* identical. The in"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `human_solver`'s own `fully_solved_nodes` (which finds subt"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " hide during active editing) - kept as a separate, generator"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " with it, since the two serve different purposes for differe"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " share a shape. The size is `render_node`'s to decide whethe"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " enough to still render in full (just closed by default) or "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " placeholder (see `OMIT_THRESHOLD`).\n"
function_item (+96 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Post-order: returns `Some(subtree size)` if `node`'s own su"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " in `sizes` too), `None` otherwise.\n"
function_item (+233 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Rows of unchanged context kept around every changed row in "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the file's real source text, so unlike the tree panels (who"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " of the code it describes) it is cheap per row - but the cor"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " multi-thousand-line source files whose diffs touch a handfu"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " those rows twice per page for nothing is exactly the page-s"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " solves for the trees. Same treatment, same reason, just a m"...
const_item
const "const"
identifier "CODE_CONTEXT_ROWS"
: ":"
primitive_type "usize"
= "="
integer_literal "6"
; ";"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A run of consecutive unchanged, out-of-context rows shorter"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " rather than folded: below it the fold placeholder costs abo"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " replaces, and reading around a two-line gap is worse than r"...
const_item
const "const"
identifier "CODE_FOLD_THRESHOLD"
: ":"
primitive_type "usize"
= "="
integer_literal "4"
; ";"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The CSS class painting `operation`, or `None` for the two s"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `Identical` text is the panel's plain, unhighlighted backgr"...
function_item (+117 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Snaps `column` down to the nearest UTF-8 character boundary"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `TextRange` columns are tree-sitter's own *byte* columns, a"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " comes from a node boundary, so a column should always alrea"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This exists so that \"should\" can't turn a malformed range i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " slicing a `&str` mid-character panics, and a whole site bui"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " fixture is a far worse outcome than that fixture's highligh"...
function_item (+74 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A caret drawn on one side to mark where the *other* side's "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the only thing a pure insertion's before panel, or a pure d"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " at all.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Derived from the other side's ranges, not this side's. `Tex"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " symmetric scheme where each side gets its own zero-width pl"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " added or removed, but that is not what reaches a consumer: "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " carries a `Delete` range whose *destination* is the zero-wi"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " after side's range list has no non-`Identical` entry at all"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `c-htop-remove-function-declaration`, whose after panel thi"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " page of unmarked context and a readable one). So the mark h"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `destination`.\n"
struct_item (+46 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The `data-range` id each range in a list carries, when the "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This is what every range gets in the tree-derived panels, w"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " independent decision. A painting is the exception - see [`p"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " spans deliberately share one id.\n"
function_item (+63 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Every caret one side should draw, read off `other`'s ranges"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `row_count` is this side's own line count, and the clamp ag"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " defensive: a delete at end-of-file puts its destination at "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " which is not a row that gets rendered. Unclamped, `code_anc"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " (it clamps for its own indexing) while the per-row lookup i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " nothing - dropping the one mark that panel had to show, sil"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " exactly this: `python-api-change` puts a caret at row 18 of"...
function_item (+241 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Maps each index in `from`'s range list to the `data-range` "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " that it points at, so a clicked span can reveal its counter"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `RangeMatch::destination` already carries the counterpart's"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " case is just a lookup of that extent in the other side's ow"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " built from one `TextDiff` over the same pair, so a destinat"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " normally present there verbatim as some range's `source`. \""...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " across the corpus's 493 mapped fixtures, 2214 of 2232 linka"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " counterpart by exact key, so the 18 that don't are not wort"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " they simply render without a link, which is what an unlinka"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " An insert or a delete has no real text on the other side to"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " position is drawn as a caret (see [`code_markers`]), and th"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the pairing reads the same in both directions.\n"
function_item (+388 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One side of one code rendering: the ranges to paint onto th"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " they carry, what each points at on the other side, and the "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " side doesn't have.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One page now holds several of these per side - the tree map"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " human painting (see [`painting_panels`]) - which is why `si"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the `'b'`/`'a'` char it used to be. Every `data-range` and "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `viewer.js`'s `spansForRange` looks ids up document-wide, s"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " would have clicks in the visible panel selecting spans in a"...
struct_item (+103 nodes collapsed)
impl_item (+364 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Both sides of one named painting, as the panels [`render_co"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The conversion is deliberately thin: a painted span *is* a "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `RangeMatch` and goes through exactly the renderer the tree"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " painting does not carry, and this does not invent:\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " * **No destination per span.** `RangeMatch::destination` ex"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " find a range's counterpart by extent; a painting states i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " into one entry instead, so the counterpart links below ar"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " and `destination` is left zero. Nothing in the rendering "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " * **No caret positions.** A `Delete` records where text *wa"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the after side, so the opposite panel draws no caret for "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `TextDiff` computes that position. This is why the fold i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `render_fixture_page`: the painting panels then keep the "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " without drawing tree data, and a one-sided fixture's oppo"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " An N:M match gives every span on a side the same id, so cli"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " whole opposite side of that entry. That is what the entry a"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " with which is explicitly not recorded (see `HumanTextEntry`"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " be inventing one.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `Err` if any entry is malformed or falls outside its file ("...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " contract). The caller skips that painting rather than faili"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `snap_to_char_boundary` clamps: one bad painting should cos"...
function_item (+793 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Which rows of a panel are actually rendered: every anchor, "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " side of it. Everything else is folded away by [`render_code"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `anchors` is the union over *every* rendering of this side "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " painting's - not one panel's own. Two reasons, and the firs"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " * A reader flips between the tree mapping and a painting to"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " panel by its own anchors shifts every row between the two"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " moving target.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " * A painting draws no carets, so a pure insertion's *before"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " all and would fall through to the \"show everything\" case "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Sharing the tree panel's anchors gives it the fold the ca"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " If nothing anchors anywhere (the two sides are wholly uncha"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " there is no change to center a fold on, and a blank panel i"...
function_item (+164 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Renders one side's source text with a rendering's changes p"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the code-shaped counterpart to `render_node`'s tree.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Built *source-text-first*: the file's own bytes are walked "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " only where a non-`Identical` range covers them. It delibera"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " ranges' own text, which would look equivalent and silently "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " ranges are whitespace-insensitive and leave gaps between th"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " especially; see `line_operations`' doc comment on why *it* "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " reason), so range-concatenation would drop exactly those ga"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `render_code_panel_reproduces_the_source_text_exactly` test"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " down, for the painted panels as much as the tree-derived on"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " remains must be the file, byte for byte.\n"
function_item (+440 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One row of a code panel: a line-number gutter cell plus the"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " stretches, highlighted spans, and any carets that belong on"...
function_item
fn "fn"
identifier "render_code_row"
parameters (+41 nodes collapsed)
-> "->"
type_identifier "String"
block
{ "{"
let_declaration
let "let"
identifier "row_len"
= "="
call_expression
field_expression
identifier "line"
. "."
field_identifier "len"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "side"
= "="
reference_expression
& "&"
field_expression
identifier "panel"
. "."
field_identifier "side"
; ";"
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
let_declaration
let "let"
mutable_specifier "mut"
identifier "segments"
: ":"
generic_type (+28 nodes collapsed)
= "="
call_expression
field_expression
call_expression
field_expression (+74 nodes collapsed)
arguments
( "("
closure_expression
closure_parameters
| "|"
tuple_pattern
( "("
identifier "index"
, ","
identifier "range_match"
) ")"
| "|"
block
{ "{"
call_expression
field_expression
call_expression
field_expression
field_expression
identifier "range_match"
. "."
field_identifier "source"
. "."
field_identifier "columns_on_row"
arguments
( "("
identifier "row"
, ","
identifier "row_len"
) ")"
. "."
field_identifier "map"
arguments (+81 nodes collapsed)
} "}"
) ")"
. "."
field_identifier "collect"
arguments
( "("
) ")"
; ";"
expression_statement (+82 nodes collapsed)
line_comment
// "//"
line_comment
// "//"
expression_statement (+36 nodes collapsed)
let_declaration
let "let"
mutable_specifier "mut"
identifier "text"
= "="
call_expression
scoped_identifier
identifier "String"
:: "::"
identifier "new"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
mutable_specifier "mut"
identifier "cursor"
= "="
integer_literal "0usize"
; ";"
let_declaration
let "let"
mutable_specifier "mut"
identifier "has_marker"
= "="
boolean_literal
false "false"
; ";"
expression_statement (+278 nodes collapsed)
expression_statement (+36 nodes collapsed)
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
let_declaration (+66 nodes collapsed)
macro_invocation
identifier "format"
! "!"
token_tree
( "("
raw_string_literal
string_content "<div class=\"cl{row_class}\" id=\"{side}L{row}\"><span class=\"ln"...
, ","
identifier "row"
+ "+"
integer_literal "1"
) ")"
} "}"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One row of the index page's sortable table - `main`'s corpu"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " fixture that has a `human_mapping.json`, computing `codedif"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " via `human_mapping::line_mismatches_for` alongside the page"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " fixture, so the index page doesn't need a second pass over "...
struct_item (+96 nodes collapsed)
function_item (+282 nodes collapsed)
function_item (+57 nodes collapsed)
function_item (+36 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "test"
) ")"
] "]"
mod_item
mod "mod"
identifier "tests"
declaration_list
{ "{"
use_declaration
use "use"
use_wildcard
super "super"
:: "::"
* "*"
; ";"
use_declaration (+30 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Undoes `escape_html_text` and strips every tag, recovering "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " row. Only usable on this module's own output, which emits a"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " entities - not a general HTML parser.\n"
function_item (+160 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Every rendered row of a code panel, as `(row index, plain t"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `id=\"{side}L{row}\"` attribute `render_code_row` stamps on e"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " no id and are skipped.\n"
function_item (+256 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The property that makes the code panel trustworthy at all: "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " mapping's changes painted on top, not a reassembly of the m"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Those two look identical on a page and are not: `diff::text"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " insensitive and leave gaps between themselves (leading inde"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " property that forces `line_operations` to be row-granular),"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " concatenating range texts silently loses the gap bytes and "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the file. Eyeballing a generated page does not catch that; "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " against the source does.\n"
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+757 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+239 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " On a pure deletion the after side has no changed text at al"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " own doc comment records, no range of its own either: the ma"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " before side's `destination`. Without the caret that panel i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " and the reader cannot tell what happened or where.\n"
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+319 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+152 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The regression `anchor_rows` was written for: on a pure del"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " changed row at all, only the caret marking where the delete"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `line_operations` alone folds that whole panel away.\n"
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+223 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+42 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The reason folding is decided across every rendering at onc"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " painting draws no carets (it records no position for a dele"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " on a pure deletion its after panel anchors nowhere - and on"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " \"show everything\", unfolding the whole file next to a tight"...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+316 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+293 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A painting spans `HumanTextSpan`s covering rows/byte-column"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " is the whole of the geometry - but the ids are the part tha"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " act on, and they are this module's invention rather than th"...
function_item (+60 nodes collapsed)
function_item (+48 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " An N:M match asserts a correspondence *whole* - which befor"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " span is explicitly not recorded (see `HumanTextEntry`). So "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " entry's one id, and points at the other side's one id: clic"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the counterpart, and no pairing is invented to make the lin"...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+367 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The one thing a painting records that the tree mapping's pr"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " thing it doesn't. A `Delete` says where text *was*; it says"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " sits on the after side, so there is no caret to draw and no"...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+228 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `viewer.js` looks `data-range` ids up document-wide, and a "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " renderings of the same two files - so a shared prefix would"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " panel selecting, and scrolling to, spans inside a hidden on"...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+349 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A malformed painting - here a span past the end of its file"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " fixture, and the site build renders 500 of them. It costs i"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " it does not take the page, let alone the run, down with it."...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+300 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The feature, end to end: a painted fixture's page carries t"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " one panel per painting, a button for each, and exactly one "...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+487 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+36 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+34 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+169 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The other link in the header, and the one this site could n"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " provenance reached it: the upstream commit the two files we"...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+306 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A handmade fixture was never sampled, so it has no upstream"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " header has to simply not carry that link rather than carry "...
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+176 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " One end of a cross-language pin. `viewer.js`'s `nodePath` w"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " rebuilds the same `kind:occurrence` path `helper::path_for_"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " has to, because that path goes into the \"file an issue\" bod"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " resolve is a silent failure: the reader gets a plausible-lo"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Two implementations of one format, so neither can be pinned"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Rust side of a shared example; `assets/mapping_site/viewer."...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `nodePath` produces the identical string for the identical "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " fails.\n"
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+133 nodes collapsed)
function_item (+113 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+274 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+331 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+323 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+498 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+231 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+541 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+491 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+175 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+299 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+614 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+507 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+358 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+334 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "test"
] "]"
function_item (+125 nodes collapsed)
} "}"