unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: vp <v.pupillo@gmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Clarification about treesit-font-lock-settings
Date: Mon, 27 Feb 2023 12:06:19 +0100	[thread overview]
Message-ID: <2825155.mvXUDI8C0e@3-191.divsi.unimi.it> (raw)
In-Reply-To: <F71B953E-7FAC-4BAB-BA43-9FCF9EF47D65@gmail.com>

Thank you Yuan!

Vincenzo

In data domenica 26 febbraio 2023 10:15:41 CET, Yuan Fu ha scritto:
> 
> > On Feb 25, 2023, at 2:18 PM, Vincenzo Pupillo <v.pupillo@gmail.com> wrote:
> > 
> > Okay, I figured out how to do it:
> >    :language 'php
> >    :feature 'attribute
> >    '((((attribute (_) @attribute_name) @font-lock-preprocessor-face) (:match "Deprecated" @attribute_name)))
> > 
> > However, I cannot understand why "treesit-query-validate" says the query is correct, but I get an error.
> > 
> > Thank you.
> > Vincenzo
> 
> Sorry that I missed your message! treesit-query-validate simply compiles the query and rely on tree-sitter to report any potential error. But predicates like #match and #equal are delegated to Emacs to handle, so tree-sitter doesn’t check for their arity and there is no error during compilation. Also, the error message should say “#match” instead of “#equal”, I fixed that typo.
> 
> Yuan
> 






      reply	other threads:[~2023-02-27 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 15:33 Clarification about treesit-font-lock-settings Vincenzo Pupillo
2023-02-25 22:18 ` Vincenzo Pupillo
2023-02-26  9:15   ` Yuan Fu
2023-02-27 11:06     ` vp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2825155.mvXUDI8C0e@3-191.divsi.unimi.it \
    --to=v.pupillo@gmail.com \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).