aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/syntax/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/ast.rs')
-rw-r--r--src/syntax/ast.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs
new file mode 100644
index 0000000..bb12e81
--- /dev/null
+++ b/src/syntax/ast.rs
@@ -0,0 +1,11 @@
+pub struct Regex {
+ pub root: Box<Pattern>,
+}
+
+pub enum Pattern {
+ Empty,
+ Literal(u8),
+ Concat(Box<Pattern>, Box<Pattern>),
+ Alt(Box<Pattern>, Box<Pattern>),
+ Star(Box<Pattern>),
+}