feat(compiler-core): more hoisting optimizations (#276)
This commit is contained in:
@@ -172,6 +172,7 @@ export interface SimpleExpressionNode extends Node {
|
||||
type: NodeTypes.SIMPLE_EXPRESSION
|
||||
content: string
|
||||
isStatic: boolean
|
||||
isConstant: boolean
|
||||
// an expression parsed as the params of a function will track
|
||||
// the identifiers declared inside the function body.
|
||||
identifiers?: string[]
|
||||
@@ -501,11 +502,13 @@ export function createObjectProperty(
|
||||
export function createSimpleExpression(
|
||||
content: SimpleExpressionNode['content'],
|
||||
isStatic: SimpleExpressionNode['isStatic'],
|
||||
loc: SourceLocation = locStub
|
||||
loc: SourceLocation = locStub,
|
||||
isConstant: boolean = false
|
||||
): SimpleExpressionNode {
|
||||
return {
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
loc,
|
||||
isConstant,
|
||||
content,
|
||||
isStatic
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user