@clyde-lang/parser
v2.4.0
Published
Parser for Clyde dialogue language
Downloads
14
Readme
Clyde Parser
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