Merge pull request #1385 from tree-sitter/feat/rust-query-match-id
feat(rust): Add an id() method for QueryMatch
This commit is contained in:
commit
80a2526843
1 changed files with 4 additions and 0 deletions
|
|
@ -1753,6 +1753,10 @@ impl QueryCursor {
|
|||
}
|
||||
|
||||
impl<'a, 'tree> QueryMatch<'a, 'tree> {
|
||||
pub fn id(&self) -> u32 {
|
||||
self.id
|
||||
}
|
||||
|
||||
pub fn remove(self) {
|
||||
unsafe { ffi::ts_query_cursor_remove_match(self.cursor, self.id) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue