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
+7 -6
View File
@@ -1,13 +1,14 @@
if(require) {
var Lexer = require("handlebars/jison_ext").Lexer
if(exports) {
var Handlebars = {};
Handlebars.Lexer = require("handlebars/jison_ext").Lexer
}
var HandlebarsLexer = function() {
Handlebars.HandlebarsLexer = function() {
this.state = "CONTENT";
};
HandlebarsLexer.prototype = new Lexer;
Handlebars.HandlebarsLexer.prototype = new Handlebars.Lexer;
HandlebarsLexer.prototype.lex = function() {
Handlebars.HandlebarsLexer.prototype.lex = function() {
if(this.input === "") return;
this.setupLex();
@@ -68,4 +69,4 @@ HandlebarsLexer.prototype.lex = function() {
}
};
if(exports) { exports.Lexer = HandlebarsLexer; }
if(exports) { exports.Lexer = Handlebars.HandlebarsLexer; }