Debian Codegraph @

docs/dev/comment-flow.mmd

raw
1 ---
2 title: Comment Flow Through Load Stack
3 ---
4 flowchart TB
5 subgraph SCANNER ["Scanner"]
6 S1[scanLineComment<br/>same-line comments]
7 S2[scanComments<br/>classify head/foot/line]
8 S3[Comment struct<br/>head, line, foot fields]
9 S1 --> S3
10 S2 --> S3
11 end
12
13 subgraph PARSER ["Parser"]
14 P1[UnfoldComments<br/>join to tokens by position]
15 P2[Parser fields<br/>HeadComment, LineComment, FootComment]
16 P3[setEventComments<br/>transfer to Event]
17 P4[TAIL_COMMENT_EVENT<br/>block-end foot comments]
18 P1 --> P2
19 P2 --> P3
20 P2 --> P4
21 end
22
23 subgraph COMPOSER ["Composer"]
24 C1[node<br/>basic transfer]
25 C2[mapping<br/>reassignment logic]
26 C3[Node fields<br/>HeadComment, LineComment, FootComment]
27 C1 --> C3
28 C2 --> C3
29 end
30
31 S3 --> P1
32 P3 --> C1
33 P4 --> C2