Files
handlebars.js/lib/handlebars/compiler/base.js
T
kpdecker 3cac2672d0 Use jsmodule for jison parser
Removes unnecessary commonjs code generated for the parser. This reduces
the size of the parse by about 700bytes and should resolve lookup issues
with browserify and other static analysis tools. See #220
2013-01-13 15:34:27 -06:00

18 lines
388 B
JavaScript

var handlebars = require("./parser");
var Handlebars = require("../base");
// BEGIN(BROWSER)
Handlebars.Parser = handlebars;
Handlebars.parse = function(string) {
Handlebars.Parser.yy = Handlebars.AST;
return Handlebars.Parser.parse(string);
};
Handlebars.print = function(ast) {
return new Handlebars.PrintVisitor().accept(ast);
};
// END(BROWSER)
module.exports = Handlebars;