UNPKG

solidity-antlr4

Version:

Solidity Lang Lexer and Parser by official ANTLR4 grammar

24 lines (23 loc) 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DataLocation = void 0; var _base = require("../base.cjs"); class DataLocation extends _base.BaseNodeString { type = "DataLocation"; name; constructor(ctx, visitor) { super(ctx, visitor); if (ctx.Storage()) { this.name = "storage"; } else if (ctx.Memory()) { this.name = "memory"; } else if (ctx.Calldata()) { this.name = "calldata"; } else { throw new Error("unknown data location"); } } } exports.DataLocation = DataLocation;