diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-24 19:19:15 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-24 19:19:15 +0530 |
| commit | db497bb9950648c056c079c591b239ad4932b5c9 (patch) | |
| tree | a554e54f9a3b0d7d7373874c508831e52ee33416 /src/types.ts | |
| parent | a4e2b5b44823571a693ad47250e40efca5f7fe10 (diff) | |
| download | elxr-db497bb9950648c056c079c591b239ad4932b5c9.tar.gz elxr-db497bb9950648c056c079c591b239ad4932b5c9.zip | |
feat(parser): implements min-max quantifier parser
Diffstat (limited to 'src/types.ts')
| -rw-r--r-- | src/types.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts index 473f5e1..dd40ce9 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,6 +3,8 @@ import { constructors, Union } from './utils' type _ = never +export type index = number + export type Literal = Union<{ String: string Number: number @@ -15,6 +17,7 @@ export type Expr = Union<{ End: _ Optional: { expr: Expr } OneOrMore: { expr: Expr } + MinMax: { expr: Expr, min: index, max: index } ZeroOrMore: { expr: Expr } AnyItem: _ Or: { exprs: Expr[] } |
