▼ |  | Syntax: Meta-Programming Helpers

1 | Parsing and Specifying Syntax
2 | Syntax Object Helpers
3 | Datum Pattern Matching
4 | Module-Processing Helpers
5 | Macro Transformer Helpers
6 | Reader Helpers
7 | Parsing for Bodies
8 | Source Locations
9 | Preserving Source Locations
10 | Non-Module Compilation And Expansion
11 | Trusting Standard Recertifying Transformers
12 | Attaching Documentation to Exports
| Index

On this page:

split-for-body

Version: 5.3.1
top ← prev up next →

### 7`` Parsing for Bodies

( require syntax/for-body )

The syntax/for-body module provides a helper function for for-like syntactic forms that wrap the body of the form while expanding to another for-like form, and the wrapper should apply only after the last #:break or #:final clause in the body.

> > procedure

> > (split-for-body stx body-stxes) → syntax?

> stx : syntax?
> body-stxes : syntax?

The body-stxes argument must have the form (pre-body ... post-body ... ), and it is rewritten into ((pre-body ... ) (post-body ... )) such that (post-body ... ) is as large as possible without containing a #:break or #:final clause.

The stx argument is used only for reporting syntax errors.

top ← prev up next →