BalticAmadeus / AblFormatter

Code formatter for Progress OpenEdge (ABL)
Apache License 2.0
5 stars 0 forks source link

Formatting broken if function statement is written over multiple lines #252

Closed gustason closed 5 hours ago

gustason commented 1 month ago

For example,

function GetDLC returns character
():
    define variable cValue as character no-undo.
end function.

gets formatted as

fu:
ction GetDLC returns character
    ():
    define variable cValue as character no-undo.
end function.
gustason commented 2 weeks ago

This kind of erroneous formatting doesn't seem to occur when blockFormatting is disabled, therefore, the problem might be in that.

gustason commented 2 weeks ago

I found that the problem is in the colon code of the BlockFormatter, as it always assumes that the colon will be on the first line.