diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-04-18 14:05:55 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-04-19 15:28:48 +0300 |
commit | 9f1bd185832c6e8acfafa6c66545a1921891da2e (patch) | |
tree | d1db06a253c6e6b3dbb97b304ff9312d7587bdea /echo.yaml | |
parent | 908b3b6f5a156c635240c8fe62bf8810d35acb9d (diff) | |
download | subplot-9f1bd185832c6e8acfafa6c66545a1921891da2e.tar.gz |
Add: support for simple patterns
Simple patterns look like this:
given: I am {name}
They get translated into a regexp:
given: I am (?P<name>\S+)
Patterns are simple unless the binding has a 'regex' key set to
boolean true.
We were parsing the bindings file (which is YAML) into a hash map of
string keys to string values. We now want to introduce an optional
boolean 'regex' fields to each binding, and switch to parsing using
serde and a temporary struct ParsedBinding that describes the YAML
list entries using Rust types. This avoids us having to have code of
our own that deals with hash map to find problems, and relies on serde
and serde_yaml to parse things using generic code.
Diffstat (limited to 'echo.yaml')
0 files changed, 0 insertions, 0 deletions