Closed
Description
There are only pub fn path_type(&self) -> Option<PathType>
for PathSegment
, which only return the first PathType
, but there maybe more than one PathType
in a PathSegment
, take <i32 as std::ops::Add>
for example, the AST of it is as the following:
[email protected]
[email protected] "<"
[email protected]
... // i32
[email protected] " "
[email protected] "as"
[email protected] " "
[email protected]
... // std::ops::Add
[email protected] ">"
So I think there can make a pub fn path_types(&self) -> Vec<PathType> { support::children(&self.syntax).collect() }
for PathSegment
to access all PathType
.