if(exports) { var Handlebars = {} } Handlebars.Lexer = function() {}; Handlebars.Lexer.prototype = { setInput: function(input) { this.input = input; this.matched = this.match = ''; this.yylineno = 0; }, setupLex: function() { this.yyleng = 0; this.yytext = ''; this.match = ''; this.readchars = 0; }, getchar: function(n) { n = n || 1; var chars = "", char = ""; for(var i=0; i 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); }, upcomingInput:function () { var next = this.match; if (next.length < 20) { next += this.input.substr(0, 20-next.length); } return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); }, showPosition:function () { var pre = this.pastInput(); var c = new Array(pre.length + 1 + this.readchars).join("-"); return pre + this.upcomingInput() + "\n" + c+"^"; }, }; Handlebars.Visitor = function() {}; Handlebars.Visitor.prototype = { accept: function(object) { return this[object.type](object); } } if(exports) { exports.Lexer = Handlebars.Lexer; exports.Visitor = Handlebars.Visitor; }