How to use the caffeine-script-runtime.toString function in caffeine-script-runtime

To help you get started, we’ve selected a few caffeine-script-runtime 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 caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / ComprehensionStn.js View on Github external
return (() => {
                    throw new Error(
                      `not supported yet: ${Caf.toString(outputType)}`
                    );
                  })();
              }
github caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / TryStn.js View on Github external
this.prototype.toJs = function(options = {}) {
        let returnExpression, body, optionalCatch;
        ({ returnExpression } = options);
        ({ body, optionalCatch } = this.labeledChildren);
        body = returnExpression ? body.toFunctionBodyJs() : body.toJs();
        optionalCatch = Caf.exists(optionalCatch) &&
          optionalCatch.toJs(options) ||
          "catch (cafError) {}";
        return `try {${Caf.toString(body)};} ${Caf.toString(optionalCatch)}`;
      };
      this.prototype.toJsExpression = function() {
github caffeine-suite / caffeine-script / source / CaffeineScript / SemanticTree / ComplexToJs / TryStn.js View on Github external
this.prototype.toJs = function(options = {}) {
        let expression, body, optionalCatch, js;
        ({ expression } = options);
        ({ body, optionalCatch } = this.labeledChildren);
        body = expression ? body.toFunctionBodyJs() : body.toJs();
        optionalCatch = Caf.exists(optionalCatch) &&
          optionalCatch.toJs(options) ||
          "catch (cafError) {}";
        js = `try {${Caf.toString(body)};} ${Caf.toString(optionalCatch)}`;
        return expression ? this.doJs(null, js) : js;
      };
    }

caffeine-script-runtime

Runtime library for CaffeineScript

ISC
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages