diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-09-10 07:56:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-09-10 07:56:15 -0700 |
commit | b2e6fda0c5ab7d0419814007530e5f655c93ea1a (patch) | |
tree | 352d8f2f010c1c94eb66c66b3afa0c132528971f | |
parent | 6fb34ff4e32cab93f437ed6c3d93042b87024437 (diff) | |
download | txr-b2e6fda0c5ab7d0419814007530e5f655c93ea1a.tar.gz txr-b2e6fda0c5ab7d0419814007530e5f655c93ea1a.tar.bz2 txr-b2e6fda0c5ab7d0419814007530e5f655c93ea1a.zip |
doc: document [. expr] support.
* txr.1: Document and advise users that it
doesn't work in 281 or older versions.
-rw-r--r-- | txr.1 | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -12018,6 +12018,34 @@ or an atom as .codn "(. sym)" . +This notation is implemented for the square brackets, according to this +transformation: + +.verb + [. expr] -> (dwim . expr) +.brev + +This is useful in Structural Pattern Matching, allowing a pattern like + +.verb + [. @args] +.brev + +to match a +.code dwim +expression and capture all of its arguments in a variable, without having +to resort to the internal notation: + +Compatibility Note: support for +.code "[. expr]" +was introduced in \*(TX 282. Older versions do not read the syntax, +but do print +.code "(dwim . @var)" +as +.code "[. @var]" +which is then unreadable in those versions, breaking read-print +consistency. + .NP* Referencing Dot A dot token which is flanked by expressions on both sides, without any |