UNPKG

@bbob/parser

Version:

A BBCode to AST Parser part of @bbob

47 lines (46 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { NodeList: function() { return NodeList; }, default: function() { return _default; } }); var NodeList = /*#__PURE__*/ function() { "use strict"; function NodeList() { this.n = []; } var _proto = NodeList.prototype; _proto.last = function last() { var len = this.n.length; if (len > 0) { return this.n[len - 1]; } return undefined; }; _proto.has = function has() { return this.n.length > 0; }; _proto.flush = function flush() { return this.n.length ? this.n.pop() : undefined; }; _proto.push = function push(value) { this.n.push(value); }; _proto.ref = function ref() { return this.n; }; return NodeList; }(); var _default = NodeList;