diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2024-03-29 09:49:26 +0000 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2024-03-29 09:49:26 +0000 |
commit | 080a24e894f125d4f1741cfdcba7cb722304d209 (patch) | |
tree | 78c12af110a8a239b6a3b1f828e4f193fcb8cd32 /subex/filter.go | |
parent | 510a8c95ce112617c33f8dfb865e752db0716cb1 (diff) | |
download | stred-go-080a24e894f125d4f1741cfdcba7cb722304d209.tar |
Completely remove the path space
The new design uses deeply nested values in the value space instead.
Diffstat (limited to 'subex/filter.go')
-rw-r--r-- | subex/filter.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/subex/filter.go b/subex/filter.go index 1a1b6db..dce0f0e 100644 --- a/subex/filter.go +++ b/subex/filter.go @@ -17,13 +17,13 @@ func (scalar selectScalarFilter) valueFilter(value walk.Value) bool { type anyNumberFilter struct {} func (_ anyNumberFilter) valueFilter(value walk.Value) bool { - _, isNumber := value.(walk.NumberScalar) + _, isNumber := value.(walk.NumberValue) return isNumber } type anyBoolFilter struct {} func (_ anyBoolFilter) valueFilter(value walk.Value) bool { - _, isBool := value.(walk.BoolScalar) + _, isBool := value.(walk.BoolValue) return isBool } @@ -34,29 +34,29 @@ func (_ anyValueFilter) valueFilter(value walk.Value) bool { type anyArrayFilter struct {} func (_ anyArrayFilter) valueFilter(value walk.Value) bool { - _, isArray := value.(walk.ArrayStructure) + _, isArray := value.(walk.ArrayValue) return isArray } type anyStringFilter struct {} func (_ anyStringFilter) valueFilter(value walk.Value) bool { - _, isString := value.(walk.StringStructure) + _, isString := value.(walk.StringValue) return isString } type runeFilter interface { - runeFilter(r walk.StringRuneAtom) bool + runeFilter(r rune) bool } type anyRuneFilter struct {} -func (_ anyRuneFilter) runeFilter(r walk.StringRuneAtom) bool { +func (_ anyRuneFilter) runeFilter(r rune) bool { return true } type selectRuneFilter struct { r rune } -func (f selectRuneFilter) runeFilter(r walk.StringRuneAtom) bool { - return f.r == rune(r) +func (f selectRuneFilter) runeFilter(r rune) bool { + return f.r == r } |