How to use the coffee-script/lib/coffee-script/scope.Scope function in coffee-script

To help you get started, we’ve selected a few coffee-script examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tower / tower / coffee-inheritance.js View on Github external
Code.prototype.compileNode = function(o) {
  var code, exprs, i, idt, lit, name, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
  o.scope = new Scope(o.scope, this.body, this);
  o.scope.shared = del(o, 'sharedScope');
  o.indent += TAB;
  delete o.bare;
  delete o.isExistentialEquals;
  params = [];
  exprs = [];
  _ref2 = this.paramNames();
  for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
    name = _ref2[_i];
    if (!o.scope.check(name)) {
      o.scope.parameter(name);
    }
  }
  _ref3 = this.params;
  for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
    param = _ref3[_j];
github rainforestapp / decaf / src / parser.js View on Github external
export function transpile(ast, meta: Object) {
  if (meta === undefined) {
    meta = {};
  }

  if (!meta.scope) {
    meta.scope = new Scope(null, coffeeParse, null, []);
    meta.indent = ' ';
  }

  const program = mapBlockStatement(ast, meta, b.program);
  return program;
}