support mininotation '..' range operator, fixes #715 (#716)

* support mininotation .. range operator, fixes #715

* remove logs
This commit is contained in:
Alex McLean 2023-10-01 13:20:49 +01:00 committed by GitHub
parent 9be1f9c18b
commit fd316c81c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 270 additions and 192 deletions

View file

@ -184,6 +184,12 @@ describe('mini', () => {
it('supports lists', () => {
expect(minV('a:b c:d:[e:f] g')).toEqual([['a', 'b'], ['c', 'd', ['e', 'f']], 'g']);
});
it('supports ranges', () => {
expect(minV('0 .. 4')).toEqual([0, 1, 2, 3, 4]);
});
it('supports patterned ranges', () => {
expect(minS('[<0 1> .. <2 4>]*2')).toEqual(minS('[0 1 2] [1 2 3 4]'));
});
});
describe('getLeafLocation', () => {