Skip to content

Commit 45eb940

Browse files
committed
Feature(compiler): Support VariableDeclarationList
1 parent 1dc9e9d commit 45eb940

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/backend/llvm/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ export function passVariableDeclaration(block: ts.VariableDeclaration, ctx: Cont
450450
);
451451
}
452452

453+
export function passVariableDeclarationList(block: ts.VariableDeclarationList, ctx: Context, builder: llvm.IRBuilder) {
454+
for (const variableDeclaration of block.declarations) {
455+
passVariableDeclaration(variableDeclaration, ctx, builder);
456+
}
457+
}
458+
453459
export function passVariableStatement(block: ts.VariableStatement, ctx: Context, builder: llvm.IRBuilder) {
454460
for (const declaration of block.declarationList.declarations) {
455461
passStatement(<any>declaration, ctx, builder);
@@ -464,6 +470,9 @@ export function passStatement(stmt: ts.Statement, ctx: Context, builder: llvm.IR
464470
case ts.SyntaxKind.VariableDeclaration:
465471
passVariableDeclaration(<any>stmt, ctx, builder);
466472
break;
473+
case ts.SyntaxKind.VariableDeclarationList:
474+
passVariableDeclarationList(<any>stmt, ctx, builder);
475+
break;
467476
case ts.SyntaxKind.VariableStatement:
468477
passVariableStatement(<any>stmt, ctx, builder);
469478
break;

0 commit comments

Comments
 (0)