Skip to content

Commit

Permalink
Add Sk.globals to initialization code...
Browse files Browse the repository at this point in the history
I think this should enable us to write the globals() function.  But I've got to do a lot more testing.  In the meantime it serves an important purpose for the experimental processing module. (That is the wrapper for processing-js)
  • Loading branch information
bnmnetp committed Apr 22, 2013
1 parent f93bc43 commit 06f7a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,7 @@ Compiler.prototype.cmod = function(mod)

var entryBlock = this.newBlock('module entry');
this.u.prefixCode = "var " + modf + "=(function($modname){";
this.u.varDeclsCode = "var $blk=" + entryBlock + ",$exc=[],$gbl={},$loc=$gbl;$gbl.__name__=$modname;";
this.u.varDeclsCode = "var $blk=" + entryBlock + ",$exc=[],$gbl={},$loc=$gbl;$gbl.__name__=$modname;Sk.globals=$gbl;";

// Add the try block that pops the try/except stack if one exists
// Github Issue #38
Expand Down

0 comments on commit 06f7a94

Please sign in to comment.