Skip to content

Commit c2f3ee4

Browse files
committed
chore: use jsdoc comments in ast
1 parent e56d33e commit c2f3ee4

File tree

1 file changed

+20
-8
lines changed
  • packages/compiler-core/src

1 file changed

+20
-8
lines changed

packages/compiler-core/src/ast.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ export interface DirectiveNode extends Node {
183183
exp: ExpressionNode | undefined
184184
arg: ExpressionNode | undefined
185185
modifiers: string[]
186-
// optional property to cache the expression parse result for v-for
186+
/**
187+
* optional property to cache the expression parse result for v-for
188+
*/
187189
parseResult?: ForParseResult
188190
}
189191

@@ -192,11 +194,15 @@ export interface SimpleExpressionNode extends Node {
192194
content: string
193195
isStatic: boolean
194196
isConstant: boolean
195-
// an expression parsed as the params of a function will track
196-
// the identifiers declared inside the function body.
197+
/**
198+
* an expression parsed as the params of a function will track
199+
* the identifiers declared inside the function body.
200+
*/
197201
identifiers?: string[]
198-
// some expressions (e.g. transformAssetUrls import identifiers) are constant,
199-
// but cannot be stringified because they must be first evaluated at runtime.
202+
/**
203+
* some expressions (e.g. transformAssetUrls import identifiers) are constant,
204+
* but cannot be stringified because they must be first evaluated at runtime.
205+
*/
200206
isRuntimeConstant?: boolean
201207
}
202208

@@ -214,8 +220,11 @@ export interface CompoundExpressionNode extends Node {
214220
| TextNode
215221
| string
216222
| symbol)[]
217-
// an expression parsed as the params of a function will track
218-
// the identifiers declared inside the function body.
223+
224+
/**
225+
* an expression parsed as the params of a function will track
226+
* the identifiers declared inside the function body.
227+
*/
219228
identifiers?: string[]
220229
}
221230

@@ -322,7 +331,10 @@ export interface FunctionExpression extends Node {
322331
returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode
323332
body?: BlockStatement | IfStatement
324333
newline: boolean
325-
// so that codegen knows it needs to generate ScopeId wrapper
334+
/**
335+
* This flag is for codegen to determine whether it needs to generate the
336+
* withScopeId() wrapper
337+
*/
326338
isSlot: boolean
327339
}
328340

0 commit comments

Comments
 (0)