MCPcopy Create free account
hub / github.com/YunYouJun/advjs / parse

Method parse

packages/parser/src/Serialize.ts:14–37  ·  view source on GitHub ↗

* 解析

(child: Mdast.Content)

Source from the content-addressed store, hash-verified

12 * 解析
13 */
14 parse(child: Mdast.Content): AdvAst.Item | undefined {
15 let node: AdvAst.Item | undefined
16 switch (child.type) {
17 case 'blockquote':
18 node = this.blockquote(child)
19 break
20 case 'paragraph':
21 node = this.paragraph(child)
22 break
23 case 'text':
24 node = this.text(child)
25 break
26 case 'code':
27 node = this.code(child)
28 break
29 case 'list':
30 node = this.list(child)
31 break
32 default:
33 break
34 }
35 if (node)
36 return node
37 }
38
39 /**
40 * 处理标题

Callers 15

paragraphMethod · 0.95
initFunction · 0.80
commitDataFunction · 0.80
getBodyJsonFunction · 0.80
readJSONFunction · 0.80
readJSONSyncFunction · 0.80
resolveGameRootFunction · 0.80
installPlayCommandFunction · 0.80
index.tsFile · 0.80
codeMethod · 0.80
parseChildFunction · 0.80
parseFunction · 0.80

Calls 5

blockquoteMethod · 0.95
paragraphMethod · 0.95
textMethod · 0.95
codeMethod · 0.95
listMethod · 0.95

Tested by

no test coverage detected