aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/syntax/ast.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-19 15:24:30 +0900
committernsfisis <nsfisis@gmail.com>2025-07-19 15:41:49 +0900
commit145efc39d14c242266c574063ffcba329c62e8a3 (patch)
treea6f6e2c78b14ed97486041cd853d2140f1b659e2 /src/syntax/ast.rs
parent6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698 (diff)
downloadregulus-145efc39d14c242266c574063ffcba329c62e8a3.tar.gz
regulus-145efc39d14c242266c574063ffcba329c62e8a3.tar.zst
regulus-145efc39d14c242266c574063ffcba329c62e8a3.zip
implement parsing
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>),
+}