diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-18 14:04:48 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-18 14:04:48 +0100 |
commit | febdc5dcd5b25a090b90c920914775265da98d39 (patch) | |
tree | f55e57e6c65dd9fa4bfc9844d2365f52b350aaf0 /subex/parse.go | |
parent | 8e9f0b186745afd51579d2a6136a57705efc7574 (diff) | |
download | stred-go-febdc5dcd5b25a090b90c920914775265da98d39.tar |
Removes try, maybe, maximise and minimise
These are no longer necessary and have been replaced by repeat
Diffstat (limited to 'subex/parse.go')
-rw-r--r-- | subex/parse.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/subex/parse.go b/subex/parse.go index 24ae082..6e1493b 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -206,7 +206,7 @@ func parseSubex(l *RuneReader, minPower int) SubexAST { case '[': rangeParts := parseRangeSubex(l) lhs = SubexASTRange {rangeParts} - case ')', '*', '-', '|', '!', '?', ';', '{': + case ')', '|', ';', '{': l.rewind() return nil case '$': @@ -247,14 +247,6 @@ func parseSubex(l *RuneReader, minPower int) SubexAST { content: lhs, acceptable: parseRepeatRange(l), } - case r == '*' && minPower <= 8: - lhs = SubexASTMaximise{lhs} - case r == '-' && minPower <= 8: - lhs = SubexASTMinimise{lhs} - case r == '!' && minPower <= 8: - lhs = SubexASTTry{lhs} - case r == '?' && minPower <= 8: - lhs = SubexASTMaybe{lhs} case r == '|' && minPower <= 4: rhs := parseSubex(l, 5) if rhs == nil { |