A PEG.js plugin for using CoffeeScript with the post-0.7 pegjs plugin API
Want to see pretty graphs? Log in now!
npm install pegcoffee
|4||downloads in the last month|
|Last Published By|
|Version||0.1.0 last updated a year ago|
|Keywords||peg, pegjs, coffee, coffeescript, plugin|
pegcoffee is a PEG.js plugin for the post-0.7 plugin API that enables the use
code is given its own scope (the semi-hidden
peg$coffee$scope object), giving
this much more intuitive behavior. You do not need to abuse the global
scope to share state across actions and predicates, and coffee will safely
scope any other variables to be local to the function.
To use from the console:
To use it via the API, you'd do something to the effect of:
PEG = require 'pegjs' pegcoffee = require 'pegcoffee' parser = PEG.buildParser "some grammar string", output: 'source' optimize: 'speed' plugins: [pegcoffee] console.log parser