Permalink
Browse files

Moved tabs declaration to Ast.js since that's the only placed used

  • Loading branch information...
1 parent c239e8b commit df908dfc2619b53cb75ba05171642550b2b17834 @qfox committed Oct 9, 2011
Showing with 13 additions and 15 deletions.
  1. +13 −2 Ast.js
  2. +0 −13 Gui.js
View
@@ -1,3 +1,16 @@
+// beautifier uses this
+if (!Number.prototype.tabs) {
+ Number.prototype.tabs = function(){
+ if (!Number.tabcache[this]) {
+ var s = '';
+ for (var i=0; i<this; ++i) s += '\t';
+ Number.tabcache[this] = s;
+ }
+ return Number.tabcache[this];
+ };
+ Number.tabcache = {};
+}
+
window.Ast = function(stack, list){
// for now, just return this custom object...
return this.generate(stack, list);
@@ -7,8 +20,6 @@ Ast.getHeatString = function(obj){
};
Ast.injectName = 'callme';
-
-
Ast.prototype = {
// https://developer.mozilla.org/en/JavaScript/Reference/Operators/Operator_Precedence
View
@@ -27,19 +27,6 @@ if (!Function.prototype.bind) {
};
}
-// beautifier uses this
-if (!Number.prototype.tabs) {
- Number.prototype.tabs = function(){
- if (!Number.tabcache[this]) {
- var s = '';
- for (var i=0; i<this; ++i) s += '\t';
- Number.tabcache[this] = s;
- }
- return Number.tabcache[this];
- };
- Number.tabcache = {};
-}
-
var Gui = function(textarea){
this.textarea = textarea;

0 comments on commit df908df

Please sign in to comment.