Add double-curly blocks

This commit is contained in:
Nigel Tao committed 2020-04-02 21:56:53 +11:00
1 parent 4cfc367a9b
commit 3fe3f84106
8 files changed
+1243 -1192

No files matched your search

+4
View File
@@ -30,6 +30,10 @@ Minor features or restrictions include:
- Labeled jumps look like `break.loopname` and `continue.loopname`, for a
matching `while.loopname`. The `while.loopname`'s closing curly brace must be
followed by `endwhile.loopname`.
- A `while true` loop's block may use double-curly braces: `{{` and `}}`. The
formatter will not add an indent to the code inside the block. This is useful
when using `while true {{ etc; break; etc; break }}` to simulate what would
be a (forwards) `goto` in other languages' straight-line code.
Wuffs code is formatted by the
[`wuffsfmt`](https://godoc.org/github.com/google/wuffs/cmd/wuffsfmt) program.