[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reliable after-change-functions (via: Using incremental parsing in E
From: |
Tuấn-Anh Nguyễn |
Subject: |
Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) |
Date: |
Thu, 2 Apr 2020 12:21:49 +0700 |
> > My suggestion is first to figure out how to do this stuff efficiently
> > from within Emacs itself, as if the module interface were not part of
> > the equation. We can add that aspect back later.
>
> There are two times the wisi code that wraps the parser needs access to
> the buffer; first to copy the text, second to add text properties
> (faces, indent values, navigation markers). There are usually many text
> properties output by each parse.
>
> The positions and values of the text properties are computed by
> functions that run after the complete syntax tree has been produced. In
> wisi, those functions are added directly in the grammar source file
> (where they are called "post-parse grammar actions"). In tree-sitter, I
> assume they are called from some mode-author-written code that traverses
> the syntax tree (wisi provides that internally). Except I see below that
> the emacs tree-sitter package stores the syntax tree in the buffer.
>
The preferred approach with tree-sitter is querying:
https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
--
Tuấn-Anh Nguyễn
Software Engineer
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), (continued)
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Robert Pluim, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Robert Pluim, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), John Yates, 2020/04/03
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs),
Tuấn-Anh Nguyễn <=
- Re: [SPAM UNSURE] Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/03
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/03
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/03
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Tuấn-Anh Nguyễn, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Jorge Javier Araya Navarro, 2020/04/02