diff --git a/README.md b/README.md index 57bc26285..f8a103dd1 100755 --- a/README.md +++ b/README.md @@ -222,6 +222,7 @@ List of Definitions * [Parallel.js](https://github.com/adambom/parallel.js) (by [Josh Baldwin](https://github.com/jbaldwin)) * [Parsimmon](https://github.com/jayferd/parsimmon) (by [Bart van der Schoor](https://github.com/Bartvds)) * [PDF.js](https://github.com/mozilla/pdf.js) (by [Josh Baldwin](https://github.com/jbaldwin)) +* [PEG.js](http://pegjs.majda.cz/) (by [vvakame](https://github.com/vvakame)) * [Persona](http://www.mozilla.org/en-US/persona) (by [James Frasca](https://github.com/Nycto)) * [PhantomJS](http://phantomjs.org) (by [Jed Hunsaker](https://github.com/jedhunsaker)) * [PhoneGap](http://phonegap.com) (by [Boris Yankov](https://github.com/borisyankov)) diff --git a/pegjs/pegjs-tests.ts b/pegjs/pegjs-tests.ts new file mode 100644 index 000000000..90ebe2da1 --- /dev/null +++ b/pegjs/pegjs-tests.ts @@ -0,0 +1,5 @@ +/// + +var input: string; +var result = PEG.parse(input); +console.log(result); diff --git a/pegjs/pegjs.d.ts b/pegjs/pegjs.d.ts new file mode 100644 index 000000000..c42b9aae5 --- /dev/null +++ b/pegjs/pegjs.d.ts @@ -0,0 +1,19 @@ +// Type definitions for PEG.js +// Project: http://pegjs.majda.cz/ +// Definitions by: vvakame +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module PEG { + function parse(input:string):any; + + class SyntaxError { + line:number; + column:number; + offset:number; + + expected:any[]; + found:any; + name:string; + message:string; + } +}