| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
What is being written to here is StderrLock, not a String.
|
| |
|
|
|
|
| |
While testing I discovered that the `#[deftly(netdoc(debug))]`
feature (which dumps parsing progress to stderr) didn't compile if the
derive was invoked from elsewhere.
|
| |
|
|
|
|
| |
Code motion fromk NetdocParseableFields to NetdocFieldsDeriveCommon.
This uses the derive-deftly imported doc comment feature.
|
| |
|
|
| |
Code motion from NetdocParseable to NetdocEntireDeriveCommon.
|
| |
|
|
| |
Code motion from ItemValueParseable to NetdocItemDeriveCommon.
|
| |
|
|
|
|
|
|
| |
Code motion from NetdocParseable to NetdocEntireDeriveCommon.
Code motion from NetdocParseableFields to NetdocFieldsDeriveCommon.
Again, the encoder wants exactly this logic.
|
| |
|
|
|
|
|
| |
Code motion from NetdocSomeItemsParseableCommon to
NetdocSomeItemsDeriveCommon.
Encoding wants exactly the same logic.
|
| |
|
|
|
|
|
| |
There is nothing actually in any of these yet. But it is most
convenient to lay out the structure now.
We'll move code into these modules in forthcoming commits.
|
| |
|
|
|
|
|
|
| |
This is only used for structs which contain items, not item value
structs.
We need a name that reflects this, especially as we are going to add a
bunch more modules full of common macro elements.
|
| | |
|
| |
|
|
|
|
|
| |
When we implemented this we documented it for ItemValueParseable but
forgot to do so for NetdocParseable.
Add some xrefs to the traits to try to stop similar mistakes.
|
| | |
|
| |
|
|
|
|
|
| |
This code sometimes expands to `let item = item;`. That's OK.
In derive-deftly 1.5.x the two `item` wrongly had different hygiene
span so the warning didn't trigger.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3502/diffs?commit_id=f9a6d90ec6d5abf2958534d2c100c84f325e3634#2525aaf11b44162850101813478c4734160e11fa_920_919
|
| |
|
|
|
|
| |
The error is not really discarded (which would seem to mean ignoring
it). The erorr *value* is discarded and is replaced with a less
informative error value.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The path in `with` must always be a module, not a function, because we
need to use it for encoding too.
In the case of `rest`, it's probably sensible to require a different
function name, given that the semantics are subtly different to those
of `rest` without `with`, since the latter can only get a single word
but with `rest` you get the whole line.
|
| | |
|
| |
|
|
|
| |
This is in the ItemValueParseable derive, so the individual fields are
Arguments, not Items.
|
| | |
|
| |\
| |
| |
| |
| | |
tor-netdoc: parse2: Combine MultiplicitySelector
See merge request tpo/core/arti!3478
|
| | |
| |
| |
| |
| | |
There is no conflict between the different uses. Having just one type
makes things simpler.
|
| | | |
|
| | |
| |
| |
| | |
This is not impl for all FromStr. We have NormalItemArgument now.
|
| |/
|
|
| |
This was added at some point, but not documented.
|
| |
|
|
|
|
|
| |
We're going to add options arguments, effectively, to the parsing
entrypoints. To avoid a proliferation of entrypoints (eg,
parse_multiple_with_options), encapsulate the run-time input values in
this structure.
|
| |
|
|
|
| |
This can result in "trait not implemented" errors here. Use the
`${paste_spanned}` trick.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Move what is now IF_NONSTRUCTURAL_ACCUMULATE into the common module.
It's not yet suitable for reuse.
The docs for ACCUMULATE_ITEM_VALUE are still wrong. We'll fix that in
a moment.
|
| |
|
|
|
|
| |
This was previously only not done because of the need to c&p.
Also, we're going to be expanding some common macros that will use it.
|
| |
|
|
| |
The hygiene is fixed in derive-deftly 1.5.x.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Have the module expect the use site to determine (mostly) the field
kind. Document this expectation.
Now NetdocParseableCommon can have the keyword-related definitions.
|
| |
|
|
| |
Put one textually-identical define in it, to start with.
|
| |
|
|
|
|
|
|
|
| |
This allows a NetdocParseableFields inside a NetdocParseableFields.
The code is rather duplicative with the NetdocParseable
implementation. This is due to limitations in derive-deftly; see
https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/525
where I'm trying to start to address them.
|
| |
|
|
| |
We're going to reuse this.
|
| |\
| |
| |
| |
| | |
tor-netdoc: parse2: Minor fixes
See merge request tpo/core/arti!3376
|
| | |
| |
| |
| | |
In principle some other trait might be in scope.
|
| | |
| |
| |
| |
| | |
subdoc intro items aren't inherently incoherent, but implementing them
is nontrivial. Let's reject them with a bespoke error instead.
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will allow us to (1) move field name handling out of the argument
parser method, and also (2) add columns more easily.
|
| | |
|
| |
|
|
|
| |
According to the docs this is supposed to name the module, not the
function. (This will be necessary when we do netdoc generation.)
|