UNPKG

solidity-antlr4

Version:

Solidity Lang Lexer and Parser by official ANTLR4 grammar

16 lines (15 loc) 468 B
import { BaseNode } from "../base.js"; export class YulSwitchStatement extends BaseNode { type = "YulSwitchStatement"; expression; switchCases; default; body = null; constructor(ctx, visitor) { super(ctx, visitor); this.expression = ctx.yulExpression().accept(visitor); this.switchCases = ctx.yulSwitchCase().map((sc) => sc.accept(visitor)); this.default = !!ctx.YulDefault(); this.body = ctx.yulBlock()?.accept(visitor) ?? null; } }