Uh oh!
There was an error while loading. Please reload this page.
Implement context-specific tags on #[derive(Sequence)] - #349
Conversation
npmccallum
commented
Jan 21, 2022
@bstrie I think you mean context specific, not context sensitive. |
tarcieri
commented
Jan 21, 2022
Thanks to the Chomsky Hierarchy I have made this mistake several times myself 😅 |
Uh oh!
There was an error while loading. Please reload this page.
npmccallum
commented
Jan 21, 2022
@bstrie I think you need to fix the commit message wording too. |
npmccallum
commented
Jan 21, 2022
@bstrie Also, one of the tests is failing. |
One of the errors is on impl::der::Sequence<'_>forIssuingDistributionPointExample{fnfields<F,T>(&self,f:F) -> ::der::Result<T>whereF:FnOnce(&[&dyn der::Encodable]) -> ::der::Result<T>,{()}}...not sure what's happening there but the empty tuple is definitely not the right result. Looks like something similar on the other error: impl<'a>::der::Sequence<'a>forOneAsymmetricKey<'a>{fnfields<F,T>(&self,f:F) -> ::der::Result<T>whereF:FnOnce(&[&dyn der::Encodable]) -> ::der::Result<T>,{()}}Perhaps the unparseable tokens are being lost? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This also adds a context-specific tag test to the code for #[derive(Choice)], and cleans up the tests in these files.
bstrie
commented
Jan 25, 2022
Code updated to pass all the tests (sorry about not doing so the first time, I forgot to test with |
| #[derive(Sequence)] | ||
| #[asn1(tag_mode = "IMPLICIT")] | ||
| pub struct TypeCheckExpandedSequenceFieldAttributeCombinations<'a> { |
There was a problem hiding this comment.
We call that "self-documenting code". :P
This also adds a context-specific tag test to the code for #[derive(Choice)], and cleans up the tests in these files.
This also adds a context-specific tag test to the code for #[derive(Choice)], and cleans up the tests in these files.
If you'd like I would be happy to add more tests to cover the interactions between the various options, but I admit that I'm not an ASN.1 expert so I would need some guidance as to how these options interact so that I could formulate the correct desugaring.
Closes#322.