emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/tree-sitter 361eaae71e 3/4: Improve treesit-query-capture


From: Yuan Fu
Subject: feature/tree-sitter 361eaae71e 3/4: Improve treesit-query-capture
Date: Thu, 22 Sep 2022 14:29:03 -0400 (EDT)

branch: feature/tree-sitter
commit 361eaae71e30d9554bb78d9ccaeddf3e006115c0
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Improve treesit-query-capture
    
    * src/treesit.c (Ftreesit_query_capture): Add a suggestion in the
    signal message.
---
 src/treesit.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/treesit.c b/src/treesit.c
index 775f823fb3..eb323e6360 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1727,10 +1727,11 @@ query.  */)
                                  &error_offset, &error_type);
       if (lisp_query == NULL)
        {
-         xsignal2 (Qtreesit_query_error,
+         xsignal3 (Qtreesit_query_error,
                    build_string
                    (ts_query_error_to_string (error_type)),
-                   make_fixnum (error_offset + 1));
+                   make_fixnum (error_offset + 1),
+                   build_pure_c_string("Debug the query with 
`treesit-query-validate'"));
        }
       /* We don't need need to free TS_QUERY and CURSOR, they are stored
         in a lisp object, which is tracked by gc.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]