Skip to content

Commit

Permalink
NO CAUSE FOR ALARM!
Browse files Browse the repository at this point in the history
webchurch whitespace and indentation cleanup
  - no changes other than indentation, hanging-whitespace, and excess empty
    lines cleaned up
  - for emacs, achieved through js2-mode wizardry (I didn't actually do this by
    hand. I do have a life...)
    + appropriate wizardry here - https://gist.github.com/rawsyntax/2846385
      js-indent-level 4 (instead of 2 as in the link)
    + 4 makes things look prettier aligned (with 'for', 'var', etc.)
      but I'm happy to change to something else (not 8 :P) if people prefer
      that
  • Loading branch information
iffsid committed May 10, 2014
1 parent 4b25d55 commit 7cd6579
Show file tree
Hide file tree
Showing 23 changed files with 4,553 additions and 4,641 deletions.
22 changes: 11 additions & 11 deletions church
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ var sys = require('sys');
var optparse = require('optparse');

function abort(msg) {
console.log(msg)
process.exit(0);
console.log(msg)
process.exit(0);
}

global["evaluate"] = require('./evaluate.js').evaluate
Expand All @@ -28,37 +28,37 @@ var parser = new optparse.OptionParser(switches);


parser.on('precompile', function(x) {
opts.pc = true;
opts.pc = true;
});

parser.on("program-args", function(opt, value) {
opts.argstring = value;
opts.argstring = value;
});

parser.on("timed", function() {
opts.timed = true;
opts.timed = true;
});

parser.on("desugar-only", function() {
opts.desugar = true;
opts.desugar = true;
});

parser.on("compile-only", function() {
opts.compile = true;
opts.compile = true;
});

parser.on("disable-church-errors", function() {
opts.disable_church_errors = true;
opts.disable_church_errors = true;
});

parser.parse(process.argv);

code = require('fs').readFileSync(srcfile, "utf8");

try {
result = format_result(evaluate(code, opts));
console.log(result);
result = format_result(evaluate(code, opts));
console.log(result);
} catch (e) {
console.log(e.message)
console.log(e.message)
throw e
}
Loading

0 comments on commit 7cd6579

Please sign in to comment.