✨ feat(vscode): 代码阅读函数块默认折叠,函数说明进属性表「说明」行
This commit is contained in:
1 parent
62f48fe67c
commit
9b32d4b5a8
17 files changed
+489
-100
No files matched your search
@@ -26,6 +26,11 @@ export interface ParameterFacts {
|
||||
export interface FunctionFacts {
|
||||
/** 匿名函数(`export default function () {}`)没有。 */
|
||||
name?: Node
|
||||
/**
|
||||
* 函数自己的说明:TypeScript 是紧贴在声明前面的 JSDoc 注释(以 `/**` 开头),Python 是主体开头的 docstring(字符串节点)。
|
||||
* 它算在块的头部里,不再单独成一块注释。
|
||||
*/
|
||||
doc?: Node
|
||||
/** 嵌套在函数体、条件等语句块里的函数没有。 */
|
||||
access?: Access
|
||||
async: boolean
|
||||
@@ -67,7 +72,10 @@ export interface VariableFacts {
|
||||
export interface BlockShape {
|
||||
/** 这一块对应的语法树节点(整条语句)。 */
|
||||
node: Node
|
||||
/** 块自己显示 / 编辑的那一段:复合语句只到主体开始之前,其余是整条语句。 */
|
||||
/**
|
||||
* 块自己显示 / 编辑的那一段:复合语句只到主体开始之前,其余是整条语句。
|
||||
* 函数的说明(FunctionFacts.doc)也算在里面:JSDoc 往上延到注释开头,docstring 往下延到字符串结尾。
|
||||
*/
|
||||
header: SourceSpan
|
||||
children: CodeBlock[]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user