BalticAmadeus / AblFormatter

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

Tree-sitter parses certain blocks as a body type #177

Closed gustason closed 2 months ago

gustason commented 2 months ago

For example, in the code

PROCEDURE testCase:
    DEFINE VARIABLE i AS INTEGER NO-UNDO.
    i = 2.

    CASE i:
        WHEN 1
        THEN DO:
            MESSAGE "Case 1".
        END.
        OTHERWISE
        MESSAGE "No match found".
    END CASE.
END PROCEDURE.

The block

DO:
    MESSAGE "Case 1".
END.

is additionally parsed as a body:

image

PauliusKu commented 2 months ago

https://github.com/usagi-coffee/tree-sitter-abl/issues/69