Restructure files to make more sense in a non-CommonJS world.

This commit is contained in:
wycats
2010-11-25 02:49:08 -08:00
parent 38f8ae84fe
commit d97bc591a2
6 changed files with 59 additions and 65 deletions
+8 -6
View File
@@ -1,6 +1,8 @@
var Lexer = function() {};
if(exports) { var Handlebars = {} }
Lexer.prototype = {
Handlebars.Lexer = function() {};
Handlebars.Lexer.prototype = {
setInput: function(input) {
this.input = input;
this.yylineno = 0;
@@ -44,15 +46,15 @@ Lexer.prototype = {
}
};
var Visitor = function() {};
Handlebars.Visitor = function() {};
Visitor.prototype = {
Handlebars.Visitor.prototype = {
accept: function(object) {
return this[object.type](object);
}
}
if(exports) {
exports.Lexer = Lexer;
exports.Visitor = Visitor;
exports.Lexer = Handlebars.Lexer;
exports.Visitor = Handlebars.Visitor;
}