stub AST results for set definition with join

This commit is contained in:
Sorrel Bri 2020-05-18 22:37:19 -07:00
parent 73761e6f60
commit c264b56c2e
2 changed files with 50 additions and 7 deletions

View file

@ -273,7 +273,51 @@ set CLICK_CONSONANTS = { TENUIS_CLICK_CONSONANTS or VOICED_CLICK_CONSONANTS
{ type: 'newLine', value: '\n'},
{ type: 'whiteSpace', value: ' '},
{ type: 'closeCurlyBracket', value: '}'}
]
],
AST: {
main: [
{
type: 'set',
setIdentifier: 'CLICK_CONSONANTS',
setExpression: [
{
type: 'operator',
operator: 'or ',
operands: [
{
type: 'identifier',
identifier: 'TENUIS_CLICK_CONSONANTS'
},
{
type: 'operator',
operator: 'or',
operands: [
{
type: 'identifier',
identifier: 'VOICED_CLICK_CONSONANTS'
},
{
type: 'operator',
operator: 'or',
operands: [
{
type: 'identifier',
identifier: 'NASAL_CLICK_CONSONANTS'
},
{
type: 'identifier',
operands: 'L_CLICK_CONSONANTS'
}
]
}
]
}
]
}
]
}
]
}
},
setDefinitionYield: {
latl: `

View file

@ -32,12 +32,11 @@ describe('parser', () => {
}
);
it.todo('lexes set definition with set join'
// , () => {
// const { latl, tokens } = assertionData.setDefinitionJoin;
// const stream = getStream(latl);
// expect(stream).toStrictEqual(tokens);
// }
it('lexes set definition with set join', () => {
const { latl, AST } = assertionData.setDefinitionJoin;
const feedResults = parser().feed(latl).results;
expect(feedResults[0]).toStrictEqual(AST);
}
);
it.todo('lexes set definition with yield operation'