Files
marqdo-view/tests/golden/analysis-v2/mixed-modes.json
T
marqdo-view dev 80ce564f09 feat(PR-02): DocumentModel, Analysis v2 projection, single renderer and Live browsing
- document.rs: comrak marqdo.md.v1 parse -> DocBlock/Inline with exact UTF-8 spans
- semantic.rs: typed Analysis v2 validation (schema/profile/root_id/source_digest,
  units/functions/statements/resources/imports/references/calls/diagnostics,
  per-span UTF-8 checks with explicit view.source_span_invalid warnings)
- presentation.rs: one PresentationModel/Outline with source status matrix
- render.rs: one ReaderRenderer; sanitized GFM, statement anchors, heading mode
  badges (display-only prefix strip), source pane, docs/Live|Static link policy,
  CSP meta, no inline scripts, no raw HTML execution
- server.rs: loopback-only Live reader with Host/DNS-rebinding checks, strict
  percent decoding, project path boundary, security headers, read-only APIs
- app.rs: AppContext degradation (core missing -> prose-only, check error ->
  diagnostics + revoked semantics, protocol mismatch -> hard error)
- assets: single reader.css/reader.js + embedded SHA-256 AssetBundle, copied
  legacy logo/blossom/feather with provenance
- examples + frozen-CLI Analysis goldens + rendering/HTTP/asset/no-coupling tests
- ADR-0003 heading prefix/anchor identity; docs updated
2026-11-22 11:19:11 +08:00

278 lines
7.8 KiB
JSON

{
"diagnostics": [],
"modules": [
{
"calls": [],
"functions": [
{
"body": [
{
"arms": [
{
"body": [
{
"kind": "assign",
"span": {
"end": 422,
"start": 406
},
"target": "result",
"value": {
"kind": "binary",
"left": {
"kind": "variable",
"name": "n",
"span": {
"end": 417,
"start": 416
}
},
"op": "mul",
"right": {
"kind": "literal",
"span": {
"end": 0,
"start": 0
},
"type": "int",
"value": "2"
},
"span": {
"end": 421,
"start": 416
}
}
},
{
"kind": "return",
"span": {
"end": 439,
"start": 424
},
"value": {
"kind": "variable",
"name": "result",
"span": {
"end": 438,
"start": 432
}
}
}
],
"condition": {
"kind": "binary",
"left": {
"kind": "variable",
"name": "n",
"span": {
"end": 398,
"start": 397
}
},
"op": "gt",
"right": {
"kind": "literal",
"span": {
"end": 0,
"start": 0
},
"type": "int",
"value": "0"
},
"span": {
"end": 402,
"start": 397
}
},
"condition_span": {
"end": 404,
"start": 392
},
"span": {
"end": 404,
"start": 392
}
},
{
"body": [
{
"kind": "return",
"span": {
"end": 461,
"start": 451
},
"value": {
"kind": "literal",
"span": {
"end": 0,
"start": 0
},
"type": "int",
"value": "0"
}
}
],
"condition": {
"kind": "literal",
"span": {
"end": 0,
"start": 0
},
"type": "bool",
"value": true
},
"condition_span": {
"end": 404,
"start": 392
},
"span": {
"end": 404,
"start": 392
}
}
],
"kind": "branch",
"span": {
"end": 404,
"start": 392
}
}
],
"effects": [
"unknown"
],
"heading_span": {
"end": 259,
"start": 246
},
"id": "root:mixed-modes@0.1.0::index.mq.md::演示.main",
"local_name": "main",
"namespace": "演示",
"signature": {
"kind": "explicit",
"params": [
{
"default": null,
"name": "n",
"required": true,
"span": {
"end": 274,
"start": 268
},
"type": "Int"
}
]
},
"span": {
"end": 470,
"start": 246
},
"unit_id": "root:mixed-modes@0.1.0::index.mq.md#演示/main"
}
],
"id": "root:mixed-modes@0.1.0::index.mq.md",
"imports": [],
"package_instance_id": "root:mixed-modes@0.1.0",
"references": [],
"relative_path": "index.mq.md",
"resources": [],
"source_digest": "c5fed57a716e06a29b669c334d475ec03bf08442e27983451ec8dd791dc999ea",
"units": [
{
"function": null,
"id": "root:mixed-modes@0.1.0::index.mq.md#",
"kind": "root",
"level": 0,
"name": "",
"span": {
"end": 470,
"start": 0
}
},
{
"function": null,
"id": "root:mixed-modes@0.1.0::index.mq.md#计算笔记",
"kind": "namespace",
"level": 1,
"name": "计算笔记",
"span": {
"end": 25,
"start": 0
}
},
{
"function": null,
"id": "root:mixed-modes@0.1.0::index.mq.md#计算笔记/算法说明",
"kind": "knowledge",
"level": 2,
"name": "算法说明",
"span": {
"end": 149,
"start": 123
}
},
{
"function": null,
"id": "root:mixed-modes@0.1.0::index.mq.md#演示",
"kind": "namespace",
"level": 1,
"name": "演示",
"span": {
"end": 244,
"start": 230
}
},
{
"function": "root:mixed-modes@0.1.0::index.mq.md::演示.main",
"id": "root:mixed-modes@0.1.0::index.mq.md#演示/main",
"kind": "function",
"level": 2,
"name": "main",
"span": {
"end": 259,
"start": 246
}
},
{
"function": null,
"id": "root:mixed-modes@0.1.0::index.mq.md#演示/main/用法",
"kind": "section",
"level": 3,
"name": "用法",
"span": {
"end": 300,
"start": 279
}
},
{
"function": "root:mixed-modes@0.1.0::index.mq.md::演示.main",
"id": "root:mixed-modes@0.1.0::index.mq.md#演示/main/计算",
"kind": "section",
"level": 3,
"name": "计算",
"span": {
"end": 390,
"start": 374
}
}
]
}
],
"producer": {
"markdown_profile": "marqdo.md.v1",
"name": "marqdo",
"version": "3.0.0-beta.1"
},
"project": {
"identity_kind": "manifest",
"lock_digest": "",
"root_id": "root:mixed-modes@0.1.0",
"stdlib": {
"digest": "sha256:5407d3665ba2fe105820d0f1af5efaafa10c277a69eb819c3225719813c8c713",
"instance_id": "std:marqdo-stdlib@0.1.0#5407d3665ba2fe105820d0f1af5efaafa10c277a69eb819c3225719813c8c713",
"version": "0.1.0"
}
},
"schema": "marqdo.analysis",
"schema_version": 2
}