You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some test cases in our project, the token tree can grow very complex and we actually only want to test if the root tiers are correctly parsed. To my understanding, if we want to use the parses_to macro, we have to specify the exact expected token tree. Is there a way to omit a sub-token-tree that we are not interested of?
e.g.
let input = "@something { whose value we *don't* care, but has to satisfy certain syntax }";parses_to!{
parser:MyParser,
input:&input,
rule:Rule::directive,
tokens:[
directive(0, input.len(),[
directive_name(0,10),
directive_value(11, input.len(),[/* here is the part we don't care about and would like to omit */]),])]};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In some test cases in our project, the token tree can grow very complex and we actually only want to test if the root tiers are correctly parsed. To my understanding, if we want to use the
parses_to
macro, we have to specify the exact expected token tree. Is there a way to omit a sub-token-tree that we are not interested of?e.g.
Beta Was this translation helpful? Give feedback.
All reactions