Use interpolated token span when building spans for bigger expressions
This commit is contained in:
parent
20edb366e7
commit
1bde18d60c
6 changed files with 42 additions and 39 deletions
|
@ -223,6 +223,14 @@ impl Token {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the token is interpolated.
|
||||
pub fn is_interpolated(&self) -> bool {
|
||||
match *self {
|
||||
Interpolated(..) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the token is an interpolated path.
|
||||
pub fn is_path(&self) -> bool {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue