Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-syntax/src/tree_sitter/query/property.rs')
-rw-r--r--helix-syntax/src/tree_sitter/query/property.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-syntax/src/tree_sitter/query/property.rs b/helix-syntax/src/tree_sitter/query/property.rs
index 037644b9..53f162c5 100644
--- a/helix-syntax/src/tree_sitter/query/property.rs
+++ b/helix-syntax/src/tree_sitter/query/property.rs
@@ -1,6 +1,7 @@
use crate::tree_sitter::query::predicate::{InvalidPredicateError, Predicate};
use crate::tree_sitter::query::QueryStr;
+#[derive(Debug)]
pub struct QueryProperty {
pub key: QueryStr,
pub val: Option<QueryStr>,
@@ -10,9 +11,9 @@ impl QueryProperty {
pub fn parse(predicate: &Predicate) -> Result<Self, InvalidPredicateError> {
predicate.check_min_arg_count(1)?;
predicate.check_max_arg_count(2)?;
- let key = predicate.str_arg(0)?;
+ let key = predicate.query_str_arg(0)?;
let val = (predicate.num_args() == 1)
- .then(|| predicate.str_arg(1))
+ .then(|| predicate.query_str_arg(1))
.transpose()?;
Ok(QueryProperty { key, val })
}