2.0.6 • Published 2 months ago

@peggyjs/eslint-parser v2.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Eslint-style parser for Peggy grammars

For linting Peggy grammars using eslint.

Install

npm install -D @peggyjs/eslint-parser

API

We'll document this more if anyone else wants to use it.

import { parseForESLint, visitor } from "@peggyjs/eslint-parser";

const parserResults = parseForESLint(text, { filePath: filename });
const v = new visitor.Visitor({
  rule(node) {
    console.log(node.name.value);
  }
});
v.visit(parserResults.ast);

Notes

This uses a slightly different grammar than the one built in to Peggy, in order to pull out information about more concrete parts of the grammar like punctuation that don't matter to Peggy semantics.

Tests codecov

2.0.6

2 months ago

2.0.5

3 months ago

2.0.4

3 months ago

2.0.3

3 months ago

2.0.2

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.0

2 years ago

1.0.0

2 years ago