[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21896: 24.5; Inconsistent handling of braces in smie
From: |
Lars Ingebrigtsen |
Subject: |
bug#21896: 24.5; Inconsistent handling of braces in smie |
Date: |
Thu, 03 Dec 2020 11:44:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
mail@ap4y.me writes:
> Using 2 possible ways of hanling braces tokens:
>
> 1. Using default lexer rules for braces (as per documentation).
> 2. Manually tokenizing braces in lexer (uncomment lines 196-197 and
> 213-214 in provided source file)
>
> I'm getting different indentation results. For the case number 1,
> indentation of the consutriction:
>
> if true {
> |foo
> }
>
> is invalid and from the logs it seems like smie doesn't parse this
> constructor correctly.
>
> For the case number 2 indentation works as expected, but for the
> construction like this (which is a simple sexp):
>
> {
> }|
>
> I'm getting "Mismatching parenthesis" error when I'm calling
> blink-matching-open.
(This bug report unfortunately got no response at the time.)
I tried reproducing this bug in Emacs 28 by loading the supplied Swift
mode, and then indenting the the example, and I got this:
if true {
foo
}
Which I assume isn't correct?
For the second problem, blink-matching-open seemed to do the correct
thing.
Before debugging further -- are you still seeing these problems with a
more recent Emacs/swift mode?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#21896: 24.5; Inconsistent handling of braces in smie,
Lars Ingebrigtsen <=