Skip to content

How to define a dependent layout #79

@oovm

Description

@oovm

I want to define a layout that has two forms, depending on whether the other layout is single-line or multi-line

For example, for the statement while cond body

If cond is single line, then body use layout 1

while true {
    layout1
}

If cond is multiline, then use body layout 2

while
     cond_a 
     && cond_b
     || cond_c
{
     layout2
}

flat_alt seems to only depend on whether itself is single-line or multi-line, is there a way to depend on other units

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions