unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gonzalo Larumbe <gonzalomlarumbe@gmail.com>
To: 72359@debbugs.gnu.org
Subject: bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
Date: Tue, 30 Jul 2024 00:17:02 +0200	[thread overview]
Message-ID: <CADYqLo9imi3kG4xyfH8buuw4QyNNNoWuMTtmDJkpmzYHmQxv6Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 517 bytes --]

Hi,

After updating tree-sitter on Arch Linux from 0.22.1 to 0.22.6 there seems
to be an error with the detection of some comment nodes under
`vhdl-ts-mode`.

In the attached VHDL file, if placing the cursor at the comment of line 10,
running:
`(treesit-node-at (point) 'vhdl)` returns `#<treesit-node block_header in
329-358>`. However, the side by side view shows that the parser correctly
detects a comment (see attached screenshot). This worked well with the
previous tree-sitter version.

Thanks a lot!

Gonzalo

[-- Attachment #1.2: Type: text/html, Size: 696 bytes --]

[-- Attachment #2: treesit-vhdl-bug.vhdl --]
[-- Type: text/x-vhdl, Size: 723 bytes --]

architecture STRUCTURE of X_GATE is
    -- global declarations of signal:
    signal A, B : BIT;
begin
    LEVEL1 : block
        -- local declaration of generic parameters
        generic (GB1, GB2 : Time);
            -- local binding of generic parameters
        generic map (GB1 => LongTime, GB2 => ShortTime);
            -- local declaration of ports
        port (PB1: in BIT; PB2 : inout BIT );
            -- local binding of ports and signals
        port map (PB1 => P1, PB2 => B);
        -- local declarations:
        constant Delay : Time := 1 ms;
        signal S1 : BIT;
    begin
        S1 <= PB1 after Delay;
        PB2 <= S1 after GB1, P1 after GB2;
    end block LEVEL1;
end architecture STRUCTURE;

[-- Attachment #3: treesit-bug.PNG --]
[-- Type: image/png, Size: 258484 bytes --]

             reply	other threads:[~2024-07-29 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 22:17 Gonzalo Larumbe [this message]
2024-08-27  8:22 ` bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6 Yuan Fu
2024-08-29 12:07   ` Eli Zaretskii
2024-09-02 17:59     ` Yuan Fu
2024-09-13 11:50       ` Gonzalo Larumbe

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=CADYqLo9imi3kG4xyfH8buuw4QyNNNoWuMTtmDJkpmzYHmQxv6Q@mail.gmail.com \
    --to=gonzalomlarumbe@gmail.com \
    --cc=72359@debbugs.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).