Matching object key again regex. Bugfixes and some changes to help in crafting compile-time matcher generation in Exjpet.
- Fix key of
<>
(any iterable) as it collided with key of<_>
(iterable with one any value) - Fix parsing of object entries matchers. Generators modified accordingly.
- Allow for matching object key with a regex.
- Retrieve all cached entries from the cache server.
- Clear all entries of the cache server.
-
epm()
type changes for{ejpet, backend(), {gen(), key()}
}.where
backend()
is the name of the backend upon which the name of the generator module has been crafted,gen()
is the opaque type of the value returnde by the generator,key()
is the key for the whole pattern.
Function
ejpet:run/3
implementation has been changed so that API user has nothing to change.
Bugfix version to help in crafting Exjpet.
- Make value
nil
matches pattern expressionnull
. - Use maps to store collect captures in
jsone
backend generator.
- Published as hex package.
ejpet
does not have any JSON decoder/encoder in its dependencies anymore. User must ensure he/she has one of the supported JSON codecs in its BEAM load path.
- Something was wrong when no (k,v) pairs of an object were matching a (k,v) pair matching pattern.
- Add support for
jsone
- Empty list
[]
used to match pattern[_]
. Shouldn't. (#5) - mochijson backend did not return captures in the required order.
- jsx backend was flawed when it came to match objects with pattern
[*]
(any list) : it shouldn't match but it did.
- Captures are returned in backend's format for JSON objects.
- Captures order may differ because of the fix done in backends.
- Add helper functions to manipulate result of the capturing process:
ejpet:get_status/1
ejpet:get_captures/1
ejpet:get_capture/2
,ejpet:get_capture/3
ejpet:empty_capture_set/0
,ejpet:empty_capture_set/1
- Add types and functions specifications in module
ejpet
. (#3)
- Fix generator for list matching : matching functions produced for patterns like
'[*, 42, "foo"]'
were flawed.
- Remove shorten pattern forms
*/
and**/
because they lead to ambiguous cases when combined with global search marker. E.g.*/**/42/g
is ambiguous when it comes to know to which between*/
and**/
the/g
tag applies to.
- Add new pattern form
<! c1, c2, ... cn !>[/g]
, enhanced version of now deprecated shorten form**/c
with possibly several conditions.
- Fix ambiguous global search marker positionning in iterable patterns.
- Remove positionnal capturing
- Global search marker
'/g'
in "iterable" pattern must now appear after the trailing>
. Was'<.../g>'
, now is'<...>/g'
- Memoization
- Add global capture
- Captures are now returned as {name, capture_list} pairs