[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using incremental parsing in Emacs
From: |
Yuan Fu |
Subject: |
Re: Using incremental parsing in Emacs |
Date: |
Sat, 4 Jan 2020 15:26:01 -0500 |
> AFAIU, these capabilities could be used as an alternative to
> regexp- and syntax-pps-based font-lock, better code folding,
> completion, refactoring, and other similar features; in general, any
> feature which would benefit from having a parse tree for the source
> code in a buffer.
Another possibility is modular editing — syntax-aware word jumps (M-f/b/d),
“free” expand-regions by parse tree, etc. I’m not sure about font-locking, but
these types of operations needs only a parse tree. So I think it suffice to
simply provide this parse tree and let packages use it like (syntax-ppss):
provide functions that returns the syntax object at point (cl-struct?) and
functions can extract informations from it, like position of beginning and end,
type, previous/next object, nested level, etc.
I’m not sure how refactoring could work (accurately), tho. Maybe it’s better to
leave refactoring to lsp servers. In general, I think we should leave tasks
that requires a deeper understanding of the semantics of the language to lsp.
Yuan
- Re: Using incremental parsing in Emacs, (continued)
- Re: Using incremental parsing in Emacs, Dmitry Gutov, 2020/01/09
- Re: Using incremental parsing in Emacs, Eli Zaretskii, 2020/01/10
- Re: Using incremental parsing in Emacs, Dmitry Gutov, 2020/01/10
- Re: Using incremental parsing in Emacs, Eli Zaretskii, 2020/01/11
- Re: Using incremental parsing in Emacs, Dmitry Gutov, 2020/01/11
- Re: Using incremental parsing in Emacs, Eli Zaretskii, 2020/01/11
Re: Using incremental parsing in Emacs,
Yuan Fu <=
Re: Using incremental parsing in Emacs, Stefan Monnier, 2020/01/04
- Re: Using incremental parsing in Emacs, Alan Third, 2020/01/05
- Re: Using incremental parsing in Emacs, Stefan Monnier, 2020/01/05
- Re: Using incremental parsing in Emacs, Eli Zaretskii, 2020/01/05
- Re: Using incremental parsing in Emacs, Stefan Monnier, 2020/01/05
- Re: Using incremental parsing in Emacs, Eli Zaretskii, 2020/01/05
- Re: Using incremental parsing in Emacs, Stefan Monnier, 2020/01/05
- Re: Using incremental parsing in Emacs, yyoncho, 2020/01/05