diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-19 15:24:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-19 15:41:49 +0900 |
| commit | 145efc39d14c242266c574063ffcba329c62e8a3 (patch) | |
| tree | a6f6e2c78b14ed97486041cd853d2140f1b659e2 /src/syntax/ast.rs | |
| parent | 6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698 (diff) | |
| download | regulus-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.rs | 11 |
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>), +} |
