aboutsummaryrefslogtreecommitdiff
path: root/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.ts')
-rw-r--r--src/types.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts
new file mode 100644
index 0000000..21e9517
--- /dev/null
+++ b/src/types.ts
@@ -0,0 +1,17 @@
+
+export type Expr =
+ | { tag: 'Start' }
+ | { tag: 'End' }
+ | { tag: 'Optional'; expr: Expr }
+ | { tag: 'OneOrMore'; expr: Expr }
+ | { tag: 'ZeroOrMore'; expr: Expr }
+ | { tag: 'NextItem' }
+ | { tag: 'AnyItem' }
+ | { tag: 'Or' }
+ | { tag: 'AnyString' }
+ | { tag: 'AnyNumber' }
+ | { tag: 'AnyBool' }
+ | { tag: 'Truthy' }
+ | { tag: 'Falsey' }
+ | { tag: 'Group'; exprs: Expr[] }
+