2010-07-29 00:51:35 -04:00
|
|
|
fs = require 'fs'
|
2010-07-17 10:28:06 -04:00
|
|
|
|
|
|
|
option '-o', '--output [DIR]', 'directory for compiled code'
|
|
|
|
|
2010-08-09 09:20:35 -04:00
|
|
|
task 'build:parser', 'rebuild the Jison parser', (options) ->
|
2010-07-17 10:28:06 -04:00
|
|
|
require 'jison'
|
2010-07-29 00:51:35 -04:00
|
|
|
code = require('./lib/grammar').parser.generate()
|
|
|
|
dir = options.output or 'lib'
|
2015-09-03 13:20:12 -04:00
|
|
|
fs.writeFile "#{dir}/parser.js", code
|