Fix ArgWithDefault TextRange (#13)

This commit is contained in:
Micha Reiser
2023-06-20 18:21:09 +02:00
committed by GitHub
parent ed3b4eb72b
commit 08ebbe40d7
13 changed files with 12591 additions and 5493 deletions

View File

@@ -1067,8 +1067,12 @@ ParameterDefs<ArgType>: (Vec<ast::ArgWithDefault>, Vec<ast::ArgWithDefault>) = {
ParameterDef<ArgType>: ast::ArgWithDefault = {
<i:ArgType> => i,
<mut i:ArgType> "=" <e:Test<"all">> => {
<mut i:ArgType> "=" <e:Test<"all">> <end_location:@R> => {
i.default = Some(Box::new(e));
#[cfg(feature = "all-nodes-with-ranges")]
{
i.range = optional_range(i.range.start(), end_location);
}
i
},
};