1.3.3 • Published 7 years ago

@invisible/merge-parsers v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@invisible/merge-parsers

CircleCI

Generate parsers for each .pegjs file in a directory. Accepts @import syntax from pegjs-import.

Install

npm install @invisible/merge-parsers

or

yarn add @invisible/merge-parsers

Usage

// src/parsers/index.js
const mergeParsers = require('@invisible/merge-parsers')

const parsers = mergeParsers({ path: './rules' }) // path contains foo.pegjs and bar.pegjs

parsers.foo() // calls the `foo` parser
parsers.bar() // calls the `bar` parser

Options

  • path - Absolute or relative path to parsers rules directory.

  • graceful - Instead of raising an error, it fails gracefully returning undefined. (default)

  • pegOptions - Options object passed through to pegjs.

    • See pegjs for more information!

Miscellaneous information

The module uses relative paths from the file that called the function.

Issues

Any issue, please, contact us on Github!

1.3.3

7 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago