emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Yuan Fu
Subject: Re: Tree-sitter api
Date: Wed, 18 Aug 2021 14:30:37 -0700

> 
> This looks very interesting, but I have a migraine right now, so I'll
> have to look at it later.

Hope you get better soon :-)

> You could try writing indent rules for Ada; current ada-mode code is in
> https://savannah.nongnu.org/git/?group=ada-mode. See the test/ directory
> for examples of known good indentation.
> 
> ada-mode takes the approach of embedding the indent rules directly in
> the grammar, and the functions that do that provide a few more options
> than yours. To see the definition of those functions, you'll have to
> install the wisi package, and look in wisi.info, section Grammar
> actions. (it would be nice if that info/html file was linked from the
> GNU ELPA package page; I'll start a new thread for that).

Thanks. I’ll see what I can do; I know nearly nothing about Ada except that it 
is commissioned by the department of defense :-)

BTW, while I was reading the manual, I noticed a typo:

If token labels are used in a right hand side, they must be
given explicitly in the indent arguments, using he lisp "cons"
                                               ^
syntax.  Labels are normally only used with EBNF grammars,
which expand into multiple right hand sides, with optional
tokens simply left out.  Explicit labels on the indent
arguments allow them to be left out as well.

Yuan





reply via email to

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