updating for Node.js' change from 'posix' to 'fs'

This commit is contained in:
Jeremy Ashkenas
2010-02-15 19:08:14 -05:00
parent 8b1b3ea402
commit 639be2ff09
4 changed files with 16 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
(function(){
var Parser, __a, __b, __c, __d, __e, __f, bnf, grammar, js, name, non_terminal, o, operators, option, parser, parser_path, part, posix, tokens, unwrap;
var Parser, __a, __b, __c, __d, __e, __f, bnf, fs, grammar, js, name, non_terminal, o, operators, option, parser, parser_path, part, tokens, unwrap;
var __hasProp = Object.prototype.hasOwnProperty;
Parser = require('jison').Parser;
// DSL ===================================================================
@@ -555,9 +555,9 @@
js = parser.generate();
// Save the parser to a file.
// puts parser.generate()
posix = require('posix');
fs = require('fs');
parser_path = 'lib/coffee_script/parser.js';
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, parseInt('0755', 8)).addCallback(function(fd) {
return posix.write(fd, js);
fs.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, parseInt('0755', 8)).addCallback(function(fd) {
return fs.write(fd, js);
});
})();