aboutsummaryrefslogtreecommitdiff
path: root/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.ts')
-rw-r--r--src/types.ts3
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[] }