moo.core.parse.split_command_fragments

moo.core.parse.split_command_fragments(line)

Split line into independent command fragments on ., ,, ;, and the standalone word THEN (case-insensitive).

The splitter is intentionally conservative — only commands clearly composed of multiple actions get split: :rtype: list[str]

  • inside quoted strings ("..." / '...') and bracketed regions ((), [], {}), no separator splits anything;

  • a ., ,, or ; only splits when followed by whitespace and an alphabetic or @ continuation (so emote waves hello., @set x [1,2], and Bill's spoon all pass through untouched; @-prefixed wizard verbs after a separator do split);

  • THEN only splits when it stands alone as a word.

Empty fragments are dropped. Lines with no separator hits round-trip as a single-element list.