✨ feat(vscode): 代码阅读能读嵌在一种语言里的另一种语言的代码:语言插件报出是哪几段,宿主交给那种语言的插件只解析这几段、分步、翻成子块并叠着上色,外层翻译插件只问读出来的样子;契约加构建文件的几种块(解析指令、阶段、执行、复制、设置、标签、健康检查、启动)、分作用范围的变量、并成一块的几条语句,引擎排这些块的属性表
This commit is contained in:
1 parent
834673391e
commit
3353cf870c
11 files changed
+603
-103
No files matched your search
@@ -206,7 +206,17 @@ function commentNodes(block: CodeBlock): Node[] {
|
||||
function ownDoc(block: CodeBlock): Node | undefined {
|
||||
if (!('facts' in block))
|
||||
return block.doc
|
||||
return block.kind === 'import' || block.kind === 'interpreter' || block.kind === 'options' ? undefined : block.facts.doc
|
||||
switch (block.kind) {
|
||||
case 'function':
|
||||
case 'class':
|
||||
case 'enum':
|
||||
case 'exception':
|
||||
case 'const':
|
||||
case 'variable':
|
||||
return block.facts.doc
|
||||
default:
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
/** 类属性的说明,照源码顺序:紧挨在它上面的注释块、它这一行行尾的注释、Python 紧跟在后面的属性 docstring。 */
|
||||
|
||||
Reference in new issue
Block a user