test: tests for codegen
This commit is contained in:
@@ -117,12 +117,14 @@ export interface ExpressionNode extends Node {
|
||||
export interface IfNode extends Node {
|
||||
type: NodeTypes.IF
|
||||
branches: IfBranchNode[]
|
||||
isRoot: boolean
|
||||
}
|
||||
|
||||
export interface IfBranchNode extends Node {
|
||||
type: NodeTypes.IF_BRANCH
|
||||
condition: ExpressionNode | undefined // else
|
||||
children: ChildNode[]
|
||||
isRoot: boolean
|
||||
}
|
||||
|
||||
export interface ForNode extends Node {
|
||||
@@ -203,14 +205,15 @@ export function createObjectProperty(
|
||||
export function createExpression(
|
||||
content: string,
|
||||
isStatic: boolean,
|
||||
loc: SourceLocation
|
||||
loc: SourceLocation,
|
||||
isInterpolation = false
|
||||
): ExpressionNode {
|
||||
return {
|
||||
type: NodeTypes.EXPRESSION,
|
||||
loc,
|
||||
content,
|
||||
isStatic,
|
||||
isInterpolation: false
|
||||
isInterpolation
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user