0.0.6 • Published 3 years ago
@underlay/tasl-lezer v0.0.6
tasl-lezer
This is a lezer grammar for tasl, a tiny algebraic schema language.
If you want to use it as a regular parser, you probably want to use:
import { parse } from "tasl-lezer"
const s = `# wow look a schema
namespace ex http://example.com/
class ex:foo {}
`
// returns an object { schema: APG.Schema; namespaces: Record<string, string> }
parse(s)
Otherwise if you're just after the raw lezer grammar, you can import that directly from ./grammar/index.js.
Development
Every time you change the grammar (or upgrade lezer
or lezer-generator
) you need to regenerate the parser:
npm run generate
Every time you change src/
you should be running the TypeScript compiler.