[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add pseudo vector types
From: |
Stefan Monnier |
Subject: |
Re: How to add pseudo vector types |
Date: |
Tue, 03 Aug 2021 09:28:57 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> But that's sub-optimal, no? Imagine a very large buffer which was
> narrowed to a small portion near EOB, then a modification made very
> close to EOB but partially before BEGV, then the buffer widened. With
> your method, TS will now have to re-parse almost the entire buffer,
> whereas we know it needs to re-parse a very small portion of it.
As a general rule, we will most likely want to work hard to avoid
exposing the narrowed buffer to TS (i.e. most calls to TS will first
`widen`).
Or we will want to keep several parse trees (one per narrowing).
We have the same problem already with `syntax-ppss` which we solve by
keeping two sets of data (`syntax-ppss-wide` and `syntax-ppss-narrow`).
Stefan
- Re: How to add pseudo vector types, (continued)
Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Fu Yuan, 2021/08/03
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Fu Yuan, 2021/08/03
- Re: How to add pseudo vector types,
Stefan Monnier <=
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Yuan Fu, 2021/08/05
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/06
- Tree-sitter api (Was: Re: How to add pseudo vector types), Fu Yuan, 2021/08/07
- Re: Tree-sitter api (Was: Re: How to add pseudo vector types), Eli Zaretskii, 2021/08/07
- Re: Tree-sitter api, Stefan Monnier, 2021/08/07
- Re: Tree-sitter api, Theodor Thornhill, 2021/08/07
- Re: Tree-sitter api, Stefan Monnier, 2021/08/07
- Re: Tree-sitter api, Yuan Fu, 2021/08/17
- Re: Tree-sitter api, Stephen Leake, 2021/08/18