josteink / wsd-mode

A major-mode for Emacs and websequencediagrams.com
MIT License
341 stars 7 forks source link

Support for "parallel" keyword (pro-only) #27

Closed josteink closed 8 years ago

josteink commented 8 years ago

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

josteink commented 8 years ago

Merged and fixed. Reopen if you encounter any issues.