@clyde-lang/parser
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

Clyde Parser

npm version

Parser for Clyde dialogue language.

import { parse } from '@clyde-lang/parser';

const result = parse(`

Hagrid: Yer a wizard, Harry!
Harry: I'm a what?

`);
// result
{
    type: 'document',
    content: [{
      type: 'content',
      content: [
        { type: 'line', value: 'Yer a wizard, Harry!', speaker: 'Hagrid' },
        { type: 'line', value: "I'm a what?", speaker: 'Harry' },
        { type: 'line', value: 'this has $everything:', id: 'id_on_first_line', tags: [ 'and_tags' ] },
      ]
    }],
    blocks: []
}

Instalation

npm install @clyde-lang/parser

# or

yarn add @clyde-lang/parser

Readme

Keywords

none

Package Sidebar

Install

npm i @clyde-lang/parser

Weekly Downloads

4

Version

2.4.0

License

MIT

Unpacked Size

143 kB

Total Files

25

Last publish

Collaborators

  • viniciusgerevini