---
source: brush-parser/src/parser/tests/compound_commands.rs
expression: "ParseResult { input, result: &result }"
---
ParseResult(
  input: "while true\ndo\n    echo loop\n    break\ndone",
  result: Program(
    complete_commands: [
      CompoundList([
        CompoundListItem(AndOrList(
          first: Pipeline(
            seq: [
              Compound(WhileClause(WhileOrUntilClauseCommand(CompoundList([
                CompoundListItem(AndOrList(
                  first: Pipeline(
                    seq: [
                      Simple(SimpleCommand(
                        word_or_name: Some(Word(
                          value: "true",
                          loc: "[location]",
                        )),
                      )),
                    ],
                  ),
                ), Sequence),
              ]), DoGroupCommand(
                list: CompoundList([
                  CompoundListItem(AndOrList(
                    first: Pipeline(
                      seq: [
                        Simple(SimpleCommand(
                          word_or_name: Some(Word(
                            value: "echo",
                            loc: "[location]",
                          )),
                          suffix: Some(CommandSuffix([
                            Word(Word(
                              value: "loop",
                              loc: "[location]",
                            )),
                          ])),
                        )),
                      ],
                    ),
                  ), Sequence),
                  CompoundListItem(AndOrList(
                    first: Pipeline(
                      seq: [
                        Simple(SimpleCommand(
                          word_or_name: Some(Word(
                            value: "break",
                            loc: "[location]",
                          )),
                        )),
                      ],
                    ),
                  ), Sequence),
                ]),
                loc: "[location]",
              ), SourceSpan(
                start: SourcePosition(
                  index: 0,
                  line: 1,
                  column: 1,
                ),
                end: SourcePosition(
                  index: 42,
                  line: 5,
                  column: 5,
                ),
              ))), None),
            ],
          ),
        ), Sequence),
      ]),
    ],
  ),
)
