<- Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/main/subexast.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2022-12-22 15:23:28 +0000
committerCharlie Stanton <charlie@shtanton.xyz>2022-12-22 15:23:28 +0000
commitfb1f51d1da22f34509cf3fe1d174296d36a0f0ad (patch)
treef07260b169af51288e76ae095b3dce3a21f01148 /main/subexast.go
parentf3911888915f6aa96e6b28bd2a98a662faf20f47 (diff)
downloadsubex-fb1f51d1da22f34509cf3fe1d174296d36a0f0ad.tar
Expressions inside stores are now subexes instead of regexes
This simplifies things by no longer needing a regex implementation It also enables transforming text as it is being read into a slot
Diffstat (limited to 'main/subexast.go')
-rw-r--r--main/subexast.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/subexast.go b/main/subexast.go
index 54cc5fe..510335f 100644
--- a/main/subexast.go
+++ b/main/subexast.go
@@ -19,12 +19,12 @@ func (ast SubexASTConcat) String() string {
}
type SubexASTStore struct {
- match RegexAST
+ match SubexAST
slot rune
}
func (ast SubexASTStore) compileWith(next SubexState) SubexState {
return SubexStoreState {
- match: ast.match.compileWith(RegexNoneState{}),
+ match: ast.match.compileWith(SubexNoneState{}),
slot: ast.slot,
next: next,
}