Skip to content

Commit

Permalink
Make filesystem paths relative
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdsteele committed Feb 22, 2015
1 parent 1c67455 commit 09c9b6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Transpiler.js
@@ -1,4 +1,5 @@
var jison = require('jison');
var path = require('path');
var fs = require('fs');

var sourceMap = require('source-map'),
Expand All @@ -21,7 +22,7 @@ var withSourceMaps = function(nodes, fileName) {
};

var transpile = function(source, fileName) {
var bnf = fs.readFileSync('./lib/arnoldc.jison', 'utf-8');
var bnf = fs.readFileSync(path.join(__dirname, './arnoldc.jison'), 'utf-8');
var parser = new jison.Parser(bnf);
parser.yy = require('./ast');
var AST = parser.parse(source);
Expand Down

0 comments on commit 09c9b6d

Please sign in to comment.