Interpreter: Include the id := in Elements

Include the "id :=" part when highlighting an Element. This places the
cursor at the 'i' now.

Done-with: @ogoffart
This commit is contained in:
Tobias Hunger 2023-04-26 16:20:01 +02:00 committed by Tobias Hunger
parent 9448e98d8a
commit 43aae1de1c
2 changed files with 26 additions and 19 deletions

View file

@ -42,6 +42,8 @@ pub trait SyntaxNodeVerify {
}
}
pub use rowan::TextRange;
/// Check that a node has the assumed children
#[cfg(test)]
macro_rules! verify_node {
@ -844,7 +846,7 @@ impl NodeOrToken {
}
}
pub fn text_range(&self) -> rowan::TextRange {
pub fn text_range(&self) -> TextRange {
match self {
NodeOrToken::Node(n) => n.text_range(),
NodeOrToken::Token(t) => t.text_range(),