Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .ccc/CCC.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ do-not-edit: never hand-edit files under `.ccc` - they are overwritten on
the next scan. To change the cache, change the source, then rescan.
---

# ContextCodeCache (20260703-15-47-40) UTC
### project: codecache
### totals: 11 files, 96 funcs, 9 consts, 124 refs, 3 notes
# ContextCodeCache (20260703-20-56-31) UTC
### project: ccc
### totals: 11 files, 96 funcs, 9 consts, 124 refs, 4 notes
### regenerate: `ccc scan`
### files
- [example/src/main.rs](example-src-main.rs.md) [rust] 2f/1c/1r/0n
Expand All @@ -32,5 +32,5 @@ do-not-edit: never hand-edit files under `.ccc` - they are overwritten on
- [src/model.rs](src-model.rs.md) [rust] 2f/0c/0r/1n
- [src/naming.rs](src-naming.rs.md) [rust] 8f/0c/7r/0n
- [src/render.rs](src-render.rs.md) [rust] 6f/0c/0r/0n
- [src/scan.rs](src-scan.rs.md) [rust] 9f/2c/9r/0n
- [src/scan.rs](src-scan.rs.md) [rust] 9f/2c/9r/1n
- [src/tokenize.rs](src-tokenize.rs.md) [rust] 12f/4c/3r/0n
2 changes: 1 addition & 1 deletion .ccc/example-src-main.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# main.rs.md (20260703-15-47-40) UTC
# main.rs.md (20260703-20-56-31) UTC
# source: example/src/main.rs [rust]
# const
- L6@DEFAULT_RADIUS:f64
Expand Down
2 changes: 1 addition & 1 deletion .ccc/example-src-math.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# math.rs.md (20260703-15-47-40) UTC
# math.rs.md (20260703-20-56-31) UTC
# source: example/src/math.rs [rust]
# const
- L4@PI:f64
Expand Down
250 changes: 125 additions & 125 deletions .ccc/src-extract.rs.md
Original file line number Diff line number Diff line change
@@ -1,130 +1,130 @@
# extract.rs.md (20260703-15-47-40) UTC
# extract.rs.md (20260703-20-56-31) UTC
# source: src/extract.rs [rust]
# const
- L475@MARKERS:&[&str]
- L469@MARKERS:&[&str]
# funcs
- L52:8@caller:String // nearest enclosing function name for caller attribution
- L65:8@current_type:Option<(String, Option<String>)> // nearest enclosing type scope (its name and receiver token) used to
- L72:8@in_function:bool
- L76:8@in_type:bool
- L85:8@extract:Option<Extracted> // parse `src` as `lang` and extract its symbols returns `None` if the source
- L144:4@visit
- L200:4@type_scope:Option<(String, Option<String>)>
- L220:4@func_owner:Option<(String, Option<String>)> // if it is a method the enclosing type scope or for go... the method's own receiver
- L230:4@go_receiver:Option<(String, Option<String>)>
- L248:4@const_eligible:bool
- L262:4@extract_func:Option<Func> // extract a function definition; returns `None` for anonymous functions we
- L276:4@func_name:Option<(String, Node<'a>)>
- L292:4@func_return:Option<String>
- L307:4@extract_consts
- L393:4@is_shouting_snek:bool
- L399:4@has_const_keyword:bool
- L405:4@classify_call:Option<RawCall>
- L416:4@resolve_callee:Option<CallKind> // reduce a call target expression to a [`CallKind`]
- L465:4@self_method:Option<CallKind>
- L477:4@maybe_note
- L499:4@preceding_comment:Option<String> // nearest comment immediately preceding a function definition, used as its
- L543:4@text:&'a str
- L548:4@pos:(usize, usize) // 1-based (line, column) of a node's start
- L554:4@oneline:String // collapse all runs of whitespace to single spaces and trim
- L558:4@truncate:String
- L568:4@strip_comment:String // strip common comment delimiters from a raw comment token
- L591:8@rust_extraction
- L615:8@go_const_block_and_call
- L629:8@ts_arrow_is_a_func
- L640:8@note_marker_word_boundary
- L652:8@qualified_call_does_not_bind_to_local_name
- L672:8@self_method_calls_resolve_by_type
- L688:8@python_only_shouting_snek_is_const
- L700:8@js_let_is_not_a_const
- L46:8@caller:String // nearest enclosing function name for caller attribution
- L59:8@current_type:Option<(String, Option<String>)> // nearest enclosing type scope (its name and receiver token) used to
- L66:8@in_function:bool
- L70:8@in_type:bool
- L79:8@extract:Option<Extracted> // parse `src` as `lang` and extract its symbols returns `None` if the source
- L138:4@visit
- L194:4@type_scope:Option<(String, Option<String>)>
- L214:4@func_owner:Option<(String, Option<String>)> // if it is a method the enclosing type scope or for go... the method's own receiver
- L224:4@go_receiver:Option<(String, Option<String>)>
- L242:4@const_eligible:bool
- L256:4@extract_func:Option<Func> // extract a function definition; returns `None` for anonymous functions we
- L270:4@func_name:Option<(String, Node<'a>)>
- L286:4@func_return:Option<String>
- L301:4@extract_consts
- L387:4@is_shouting_snek:bool
- L393:4@has_const_keyword:bool
- L399:4@classify_call:Option<RawCall>
- L410:4@resolve_callee:Option<CallKind> // reduce a call target expression to a [`CallKind`]
- L459:4@self_method:Option<CallKind>
- L471:4@maybe_note
- L493:4@preceding_comment:Option<String> // nearest comment immediately preceding a function definition, used as its
- L537:4@text:&'a str
- L542:4@pos:(usize, usize) // 1-based (line, column) of a node's start
- L548:4@oneline:String // collapse all runs of whitespace to single spaces and trim
- L552:4@truncate:String
- L562:4@strip_comment:String // strip common comment delimiters from a raw comment token
- L585:8@rust_extraction
- L609:8@go_const_block_and_call
- L623:8@ts_arrow_is_a_func
- L634:8@note_marker_word_boundary
- L646:8@qualified_call_does_not_bind_to_local_name
- L666:8@self_method_calls_resolve_by_type
- L682:8@python_only_shouting_snek_is_const
- L694:8@js_let_is_not_a_const
# refs
- extract@L101 calls L144:4@visit
- visit@L149 calls L200:4@type_scope:Option<(String, Option<String>)>
- visit@L153 calls L262:4@extract_func:Option<Func>
- visit@L154 calls L220:4@func_owner:Option<(String, Option<String>)>
- visit@L180 calls L248:4@const_eligible:bool
- visit@L181 calls L307:4@extract_consts
- visit@L184 calls L405:4@classify_call:Option<RawCall>
- visit@L188 calls L477:4@maybe_note
- visit@L193 calls L144:4@visit
- type_scope@L203 calls L554:4@oneline:String
- type_scope@L203 calls L543:4@text:&'a str
- func_owner@L222 calls L230:4@go_receiver:Option<(String, Option<String>)>
- go_receiver@L238 calls L554:4@oneline:String
- go_receiver@L238 calls L543:4@text:&'a str
- go_receiver@L242 calls L554:4@oneline:String
- go_receiver@L242 calls L543:4@text:&'a str
- extract_func@L263 calls L276:4@func_name:Option<(String, Node<'a>)>
- extract_func@L264 calls L548:4@pos:(usize, usize)
- extract_func@L265 calls L292:4@func_return:Option<String>
- extract_func@L266 calls L499:4@preceding_comment:Option<String>
- func_name@L278 calls L554:4@oneline:String
- func_name@L278 calls L543:4@text:&'a str
- func_name@L285 calls L554:4@oneline:String
- func_name@L285 calls L543:4@text:&'a str
- func_return@L295 calls L554:4@oneline:String
- func_return@L295 calls L543:4@text:&'a str
- extract_consts@L313 calls L554:4@oneline:String
- extract_consts@L313 calls L543:4@text:&'a str
- extract_consts@L315 calls L548:4@pos:(usize, usize)
- extract_consts@L316 calls L554:4@oneline:String
- extract_consts@L316 calls L543:4@text:&'a str
- extract_consts@L324 calls L554:4@oneline:String
- extract_consts@L324 calls L543:4@text:&'a str
- extract_consts@L326 calls L393:4@is_shouting_snek:bool
- extract_consts@L331 calls L554:4@oneline:String
- extract_consts@L331 calls L543:4@text:&'a str
- extract_consts@L333 calls L548:4@pos:(usize, usize)
- extract_consts@L341 calls L399:4@has_const_keyword:bool
- extract_consts@L360 calls L554:4@oneline:String
- extract_consts@L360 calls L543:4@text:&'a str
- extract_consts@L366 calls L548:4@pos:(usize, usize)
- extract_consts@L367 calls L554:4@oneline:String
- extract_consts@L367 calls L543:4@text:&'a str
- extract_consts@L377 calls L554:4@oneline:String
- extract_consts@L377 calls L543:4@text:&'a str
- extract_consts@L382 calls L548:4@pos:(usize, usize)
- extract_consts@L383 calls L554:4@oneline:String
- extract_consts@L383 calls L543:4@text:&'a str
- classify_call@L407 calls L416:4@resolve_callee:Option<CallKind>
- classify_call@L410 calls L548:4@pos:(usize, usize)
- resolve_callee@L419 calls L554:4@oneline:String
- resolve_callee@L419 calls L543:4@text:&'a str
- resolve_callee@L423 calls L554:4@oneline:String
- resolve_callee@L423 calls L543:4@text:&'a str
- resolve_callee@L424 calls L465:4@self_method:Option<CallKind>
- resolve_callee@L428 calls L554:4@oneline:String
- resolve_callee@L428 calls L543:4@text:&'a str
- resolve_callee@L431 calls L554:4@oneline:String
- resolve_callee@L431 calls L543:4@text:&'a str
- resolve_callee@L442 calls L554:4@oneline:String
- resolve_callee@L442 calls L543:4@text:&'a str
- resolve_callee@L443 calls L465:4@self_method:Option<CallKind>
- resolve_callee@L448 calls L554:4@oneline:String
- resolve_callee@L448 calls L543:4@text:&'a str
- resolve_callee@L449 calls L465:4@self_method:Option<CallKind>
- resolve_callee@L454 calls L554:4@oneline:String
- resolve_callee@L454 calls L543:4@text:&'a str
- resolve_callee@L455 calls L465:4@self_method:Option<CallKind>
- resolve_callee@L460 calls L416:4@resolve_callee:Option<CallKind>
- self_method@L468 calls L554:4@oneline:String
- self_method@L468 calls L543:4@text:&'a str
- maybe_note@L478 calls L543:4@text:&'a str
- maybe_note@L479 calls L568:4@strip_comment:String
- maybe_note@L487 calls L554:4@oneline:String
- maybe_note@L492 calls L548:4@pos:(usize, usize)
- maybe_note@L493 calls L558:4@truncate:String
- preceding_comment@L530 calls L568:4@strip_comment:String
- preceding_comment@L530 calls L543:4@text:&'a str
- preceding_comment@L533 calls L554:4@oneline:String
- preceding_comment@L537 calls L558:4@truncate:String
- rust_extraction@L597 calls L85:8@extract:Option<Extracted>
- go_const_block_and_call@L620 calls L85:8@extract:Option<Extracted>
- ts_arrow_is_a_func@L632 calls L85:8@extract:Option<Extracted>
- note_marker_word_boundary@L646 calls L85:8@extract:Option<Extracted>
- qualified_call_does_not_bind_to_local_name@L660 calls L85:8@extract:Option<Extracted>
- self_method_calls_resolve_by_type@L681 calls L85:8@extract:Option<Extracted>
- python_only_shouting_snek_is_const@L691 calls L85:8@extract:Option<Extracted>
- js_let_is_not_a_const@L704 calls L85:8@extract:Option<Extracted>
- extract@L95 calls L138:4@visit
- visit@L143 calls L194:4@type_scope:Option<(String, Option<String>)>
- visit@L147 calls L256:4@extract_func:Option<Func>
- visit@L148 calls L214:4@func_owner:Option<(String, Option<String>)>
- visit@L174 calls L242:4@const_eligible:bool
- visit@L175 calls L301:4@extract_consts
- visit@L178 calls L399:4@classify_call:Option<RawCall>
- visit@L182 calls L471:4@maybe_note
- visit@L187 calls L138:4@visit
- type_scope@L197 calls L548:4@oneline:String
- type_scope@L197 calls L537:4@text:&'a str
- func_owner@L216 calls L224:4@go_receiver:Option<(String, Option<String>)>
- go_receiver@L232 calls L548:4@oneline:String
- go_receiver@L232 calls L537:4@text:&'a str
- go_receiver@L236 calls L548:4@oneline:String
- go_receiver@L236 calls L537:4@text:&'a str
- extract_func@L257 calls L270:4@func_name:Option<(String, Node<'a>)>
- extract_func@L258 calls L542:4@pos:(usize, usize)
- extract_func@L259 calls L286:4@func_return:Option<String>
- extract_func@L260 calls L493:4@preceding_comment:Option<String>
- func_name@L272 calls L548:4@oneline:String
- func_name@L272 calls L537:4@text:&'a str
- func_name@L279 calls L548:4@oneline:String
- func_name@L279 calls L537:4@text:&'a str
- func_return@L289 calls L548:4@oneline:String
- func_return@L289 calls L537:4@text:&'a str
- extract_consts@L307 calls L548:4@oneline:String
- extract_consts@L307 calls L537:4@text:&'a str
- extract_consts@L309 calls L542:4@pos:(usize, usize)
- extract_consts@L310 calls L548:4@oneline:String
- extract_consts@L310 calls L537:4@text:&'a str
- extract_consts@L318 calls L548:4@oneline:String
- extract_consts@L318 calls L537:4@text:&'a str
- extract_consts@L320 calls L387:4@is_shouting_snek:bool
- extract_consts@L325 calls L548:4@oneline:String
- extract_consts@L325 calls L537:4@text:&'a str
- extract_consts@L327 calls L542:4@pos:(usize, usize)
- extract_consts@L335 calls L393:4@has_const_keyword:bool
- extract_consts@L354 calls L548:4@oneline:String
- extract_consts@L354 calls L537:4@text:&'a str
- extract_consts@L360 calls L542:4@pos:(usize, usize)
- extract_consts@L361 calls L548:4@oneline:String
- extract_consts@L361 calls L537:4@text:&'a str
- extract_consts@L371 calls L548:4@oneline:String
- extract_consts@L371 calls L537:4@text:&'a str
- extract_consts@L376 calls L542:4@pos:(usize, usize)
- extract_consts@L377 calls L548:4@oneline:String
- extract_consts@L377 calls L537:4@text:&'a str
- classify_call@L401 calls L410:4@resolve_callee:Option<CallKind>
- classify_call@L404 calls L542:4@pos:(usize, usize)
- resolve_callee@L413 calls L548:4@oneline:String
- resolve_callee@L413 calls L537:4@text:&'a str
- resolve_callee@L417 calls L548:4@oneline:String
- resolve_callee@L417 calls L537:4@text:&'a str
- resolve_callee@L418 calls L459:4@self_method:Option<CallKind>
- resolve_callee@L422 calls L548:4@oneline:String
- resolve_callee@L422 calls L537:4@text:&'a str
- resolve_callee@L425 calls L548:4@oneline:String
- resolve_callee@L425 calls L537:4@text:&'a str
- resolve_callee@L436 calls L548:4@oneline:String
- resolve_callee@L436 calls L537:4@text:&'a str
- resolve_callee@L437 calls L459:4@self_method:Option<CallKind>
- resolve_callee@L442 calls L548:4@oneline:String
- resolve_callee@L442 calls L537:4@text:&'a str
- resolve_callee@L443 calls L459:4@self_method:Option<CallKind>
- resolve_callee@L448 calls L548:4@oneline:String
- resolve_callee@L448 calls L537:4@text:&'a str
- resolve_callee@L449 calls L459:4@self_method:Option<CallKind>
- resolve_callee@L454 calls L410:4@resolve_callee:Option<CallKind>
- self_method@L462 calls L548:4@oneline:String
- self_method@L462 calls L537:4@text:&'a str
- maybe_note@L472 calls L537:4@text:&'a str
- maybe_note@L473 calls L562:4@strip_comment:String
- maybe_note@L481 calls L548:4@oneline:String
- maybe_note@L486 calls L542:4@pos:(usize, usize)
- maybe_note@L487 calls L552:4@truncate:String
- preceding_comment@L524 calls L562:4@strip_comment:String
- preceding_comment@L524 calls L537:4@text:&'a str
- preceding_comment@L527 calls L548:4@oneline:String
- preceding_comment@L531 calls L552:4@truncate:String
- rust_extraction@L591 calls L79:8@extract:Option<Extracted>
- go_const_block_and_call@L614 calls L79:8@extract:Option<Extracted>
- ts_arrow_is_a_func@L626 calls L79:8@extract:Option<Extracted>
- note_marker_word_boundary@L640 calls L79:8@extract:Option<Extracted>
- qualified_call_does_not_bind_to_local_name@L654 calls L79:8@extract:Option<Extracted>
- self_method_calls_resolve_by_type@L675 calls L79:8@extract:Option<Extracted>
- python_only_shouting_snek_is_const@L685 calls L79:8@extract:Option<Extracted>
- js_let_is_not_a_const@L698 calls L79:8@extract:Option<Extracted>
# note
- @L641 "notes" must not trigger, but a real TODO must
- @L635 "notes" must not trigger, but a real TODO must
2 changes: 1 addition & 1 deletion .ccc/src-languages.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# languages.rs.md (20260703-15-47-40) UTC
# languages.rs.md (20260703-20-56-31) UTC
# source: src/languages.rs [rust]
# const
# funcs
Expand Down
2 changes: 1 addition & 1 deletion .ccc/src-lib.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lib.rs.md (20260703-15-47-40) UTC
# lib.rs.md (20260703-20-56-31) UTC
# source: src/lib.rs [rust]
# const
# funcs
Expand Down
2 changes: 1 addition & 1 deletion .ccc/src-main.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# main.rs.md (20260703-15-47-40) UTC
# main.rs.md (20260703-20-56-31) UTC
# source: src/main.rs [rust]
# const
# funcs
Expand Down
2 changes: 1 addition & 1 deletion .ccc/src-model.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# model.rs.md (20260703-15-47-40) UTC
# model.rs.md (20260703-20-56-31) UTC
# source: src/model.rs [rust]
# const
# funcs
Expand Down
2 changes: 1 addition & 1 deletion .ccc/src-naming.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# naming.rs.md (20260703-15-47-40) UTC
# naming.rs.md (20260703-20-56-31) UTC
# source: src/naming.rs [rust]
# const
# funcs
Expand Down
4 changes: 2 additions & 2 deletions .ccc/src-render.rs.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# render.rs.md (20260703-15-47-40) UTC
# render.rs.md (20260703-20-56-31) UTC
# source: src/render.rs [rust]
# const
# funcs
- L9:8@now_ts:String // current UTC timestamp formatted as `yyyymmdd-hh-mm-ss`
- L14:8@render_file:String // render a single per-file cache entry
- L70:8@render_index:String // render the `CCC.md` index for the whole project
- L70:8@render_index:String // render the CCC index for the whole project
- L137:8@strip_timestamps:String // replace embedded generation timestamps with a fixed token so freshness
- L141:4@strip_ts_line:String
- L159:8@timestamps_are_normalized_away
Expand Down
5 changes: 3 additions & 2 deletions .ccc/src-scan.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# scan.rs.md (20260703-15-47-40) UTC
# scan.rs.md (20260703-20-56-31) UTC
# source: src/scan.rs [rust]
# const
- L13@SKIP_DIRS:&[&str]
Expand All @@ -7,7 +7,7 @@
- L55:12@as_str:&'static str
- L73:8@collect_files:Result<Vec<PathBuf>> // Discover supported source files under `root`
- L113:8@build_caches:Vec<FileCache> // parse every discovered file into a `FileCache`, sorted by path
- L121:4@disambiguate_cache_names // ensure every `cache_name` is unique wit distinct source paths
- L121:4@disambiguate_cache_names // fixes bug where cache_name wasnt unique oops
- L138:4@build_one:Option<FileCache>
- L155:4@render_all:BTreeMap<String, String>
- L165:8@scan:Result<ScanReport> // scan root and (re)write the `.ccc` directory
Expand All @@ -24,3 +24,4 @@
- check@L194 calls L113:8@build_caches:Vec<FileCache>
- check@L196 calls L155:4@render_all:BTreeMap<String, String>
# note
- @L120 fixes bug where cache_name wasnt unique oops
2 changes: 1 addition & 1 deletion .ccc/src-tokenize.rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tokenize.rs.md (20260703-15-47-40) UTC
# tokenize.rs.md (20260703-20-56-31) UTC
# source: src/tokenize.rs [rust]
# const
- L15@TOKENS_BIN:&str
Expand Down
Binary file modified .ccc/tokens.bin
Binary file not shown.
10 changes: 5 additions & 5 deletions .ccc/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"note": "APPROXIMATE tiktoken IDs - NOT compatible with Claude/Anthropic models. Claude uses a different tokenizer, and its Messages API accepts text, not token IDs, so these IDs cannot be loaded into Claude and only roughly approximate its token counts (tiktoken undercounts Claude tokens, more so on code). Intended for a downstream model that shares this tiktoken vocabulary, or for rough size estimates. For exact Claude token counts, use Anthropic's /v1/messages/count_tokens endpoint.",
"token_width": 4,
"endianness": "le",
"total_tokens": 5515,
"total_tokens": 5524,
"files": [
{
"file": "CCC.md",
Expand Down Expand Up @@ -55,16 +55,16 @@
{
"file": "src-render.rs.md",
"offset": 4531,
"len": 155
"len": 152
},
{
"file": "src-scan.rs.md",
"offset": 4686,
"len": 434
"offset": 4683,
"len": 446
},
{
"file": "src-tokenize.rs.md",
"offset": 5120,
"offset": 5129,
"len": 395
}
]
Expand Down
2 changes: 1 addition & 1 deletion example/.ccc/CCC.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ do-not-edit: never hand-edit files under `.ccc` - they are overwritten on
the next scan. To change the cache, change the source, then rescan.
---

# ContextCodeCache (20260703-15-47-40) UTC
# ContextCodeCache (20260703-20-56-31) UTC
### project: example
### totals: 2 files, 4 funcs, 2 consts, 2 refs, 1 notes
### regenerate: `ccc scan`
Expand Down
Loading