diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-07 17:51:12 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-07 17:52:33 +0530 |
| commit | b3fc08cae05f997e71d846109d400e630b8a4c35 (patch) | |
| tree | e3bf0ab1836aade74593123e978fe49b9a09b7df /tests | |
| parent | ad8983655dc35b5401e810a9d4b61e933d35b783 (diff) | |
| download | elxr-b3fc08cae05f997e71d846109d400e630b8a4c35.tar.gz elxr-b3fc08cae05f997e71d846109d400e630b8a4c35.zip | |
feat: adds quantifier suffix parsing + recoverInput for combinators
Diffstat (limited to '')
| -rw-r--r-- | tests/basic.spec.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basic.spec.ts b/tests/basic.spec.ts index b0a4d50..4e0a938 100644 --- a/tests/basic.spec.ts +++ b/tests/basic.spec.ts @@ -45,5 +45,18 @@ describe('Foobar', () => { ], '' ])) + + expect(parser(/^ \s* \T? \n+ $/.source)).toEqual(right([ + [ + some({ tag: 'Start' }), + [ + { tag: 'ZeroOrMore', expr: { tag: 'AnyString' } }, + { tag: 'Optional', expr: { tag: 'Truthy' } }, + { tag: 'OneOrMore', expr: { tag: 'AnyNumber' } }, + ], + some({ tag: 'End' }), + ], + '' + ])) }) }) |
