emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock


From: Stefan Monnier
Subject: Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2)
Date: Tue, 16 Aug 2022 13:19:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I'm only saying there's a disconnect between Jostein's report and Po's
> response.  It's probably a UI issue.  There's a checkbox in a dropdown
> menu that says "Source Code Parsers (Semantic)".

FWIW, I've used (semantic-mode 1) to enable CEDET in Emacs's C source
files and that was all that was needed to get TAB completion of struct
field's names working.
I haven't used it for much more than that, admittedly.

> *  "${" and "{" could both open a block closed by "}"

Why do you think it's a problem?

> *  if/fi, case/esac, etc, or possibly all keyword blocks are closed by "end"

These aren't handled by syntax tables.

> *  "variadic" structures like try/catch+/finally?

Same.

> It's not clear from the doc just how much this reliance on the syntax
> table based block identification is baked into the lexer/parser
> generation.

IIRC the syntax-tables are used for speed so as to skip whole blocks
without fully parsing their contents.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]