UNPKG

liquid-node

Version:

Node.js port of Tobias Lütke's Liquid template engine.

41 lines (32 loc) 1.28 kB
// Generated by CoffeeScript 1.10.0 (function() { var Liquid, Raw, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Liquid = require("../../liquid"); module.exports = Raw = (function(superClass) { extend(Raw, superClass); function Raw() { return Raw.__super__.constructor.apply(this, arguments); } Raw.prototype.parse = function(tokens) { return Promise.resolve().then((function(_this) { return function() { var match, token; if (tokens.length === 0 || _this.ended) { return Promise.resolve(); } token = tokens.shift(); match = Liquid.Block.FullToken.exec(token.value); if ((match != null ? match[1] : void 0) === _this.blockDelimiter()) { return _this.endTag(); } _this.nodelist.push(token.value); return _this.parse(tokens); }; })(this)); }; return Raw; })(Liquid.Block); }).call(this); //# sourceMappingURL=raw.js.map