Skip to content

Commit

Permalink
Correctly add terminator to generated file name.
Browse files Browse the repository at this point in the history
Correctly add terminator to generated file name used to name the
instrumentable source files generated by the parser generator.

See #114.
  • Loading branch information
flatheadmill committed Jul 7, 2013
1 parent 3dcdd95 commit fc94d8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/require.js
Expand Up @@ -18,14 +18,14 @@ module.exports = function (pattern, source) {
if (!(i && pattern[i - 1].lengthEncoding) && f.repeat != Math.MAX_VALUE) {
scalar += f.repeat;
}
if (f.terminated) {
scalar += '_t' + f.terminated.join('-');
if (f.terminator) {
scalar += '_t' + f.terminator.join('-');
}
}
return scalar;
}).join('_');

console.log(name);
console.log(name);
var file = path.join(__dirname, 'generated', name + '.js');
require('fs').writeFileSync(file, builder.join('\n'), 'utf8');
return require(file);
Expand Down

0 comments on commit fc94d8d

Please sign in to comment.