UNPKG

solidity-antlr4

Version:

Solidity Lang Lexer and Parser by official ANTLR4 grammar

22 lines (21 loc) 581 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IfStatement = void 0; var _base = require("../base.cjs"); class IfStatement extends _base.BaseNode { type = "IfStatement"; condition; ifStatement; elseStatement = null; constructor(ctx, visitor) { super(ctx, visitor); this.condition = ctx.expression().accept(visitor); this.ifStatement = ctx.statement(0).accept(visitor); if (ctx.Else() && ctx.statement(1)) { this.elseStatement = ctx.statement(1).accept(visitor); } } } exports.IfStatement = IfStatement;