UNPKG

solidity-antlr4

Version:

Solidity Lang Lexer and Parser by official ANTLR4 grammar

12 lines (11 loc) 367 B
import { BaseNode } from "../base.js"; export class YulVariableDeclaration extends BaseNode { type = "YulVariableDeclaration"; identifiers = []; expression = null; constructor(ctx, visitor) { super(ctx, visitor); this.identifiers = ctx.YulIdentifier().map((i) => i.getText()); this.expression = ctx.yulExpression()?.accept(visitor) ?? null; } }