ada-mode-users
[Top][All Lists]
Advanced

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

Re: [Ada-mode-users] last line of an expression indented to the left rel


From: Stephen Leake
Subject: Re: [Ada-mode-users] last line of an expression indented to the left relative to the previous line
Date: Mon, 30 Jan 2017 17:33:21 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (windows-nt)

The problem was a missing (progn ... ) in a grammar action; fixed in
abac7e41b83d1bbfd294651fada50ee8ed476b99


Stephen Leake <address@hidden> writes:

> Ludovic Brenta <address@hidden> writes:
>
>> In the example below, the last line containing "message is discarded"
>> is mysteriously indented left relative to the preceding line. The two
>> "&" operators should be aligned vertically. The parse succeeds. Is
>> there a way to explain this choice by the indentation engine?
>
> (strings snipped to fit in email; one reason I don't like indents that
> depend on name length :)
>
>> procedure P is
>> begin
>>   Error_Report.Report_Error (Severity    => Error_Report.Warning,
>>                              Title       => "ROBOT_ERROR",
>>                              Description =>
>>                                "DLA/CHG Message received after TACT"
>>                                  & Flight_Identifier.Safe_Image ("toto")
>>                                & " => message is discarded !!");
>
> This is indented relative to the left paren '(Severity'.
>
>> The trigger for this bug is the function call; a static string instead
>> gives the expected result:
>>
>> procedure P is
>> begin
>>   Error_Report.Report_Error (Severity    => Error_Report.Warning,
>>                              Title       => "ROBOT_ERROR",
>>                              Description =>
>>                                "DLA/CHG Message received after TACT"
>>                                  & "toto"
>>                                  & " => message is discarded !!");
>
> This is indented relative to the "expression_start" at "DLA", which is
> the desired behavior.
>
>
> The problem is that the name "Flight_Identifier..." is contained by "=>"
> ; it should be contained by the expression_start. The grammar says it
> is, and the expression is contained by "=>", so I don't see why this
> doesn't work; I'll have to dig into wisi-containing-action.

-- 
-- Stephe



reply via email to

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