josteink / wsd-mode

A major-mode for Emacs and websequencediagrams.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for "parallel" keyword (pro-only)

josteink opened this issue · comments

As seen in the documentation, the keyword parallel exists and causes indentation when used with curly braces:

parallel {
    Client->Proxy: Request
    Proxy->Server: Forwarded Request
    note right of Server: Web proxy in operation
}

To support this syntax correctly, the implementation should search for the full phrase parallel { (that is, including the trailing {).

It should be researched if other "popular" variations of this syntax also works on the WSD-website, because then it should also be supported in the major-mode. Most obvious one being:

parallel
{
    statements
}

To fully support this kind of indentation, a reg-exp based matcher will probably be required (as opposed to just looking at the first token on the line), but this is also what seems to be the consensus on issue 26.

Because that issue is more complex and will have more impact on the final implementation, and whatever works there will work for this syntax, this issue should be postponed solved until the other issue has been fully fixed.

CC: @dlasko

Merged and fixed. Reopen if you encounter any issues.