summaryrefslogtreecommitdiffstats
path: root/protsym.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-01 19:51:54 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-01 19:51:54 -0800
commita2ebdf6228c7bee57ca9470477f09b2649501c2c (patch)
tree1b86de96bfd095883a5fac6116ddfbbc005ea570 /protsym.c
parent91df29c08fc14d0344892891b1adf68894ea84c4 (diff)
downloadtxr-a2ebdf6228c7bee57ca9470477f09b2649501c2c.tar.gz
txr-a2ebdf6228c7bee57ca9470477f09b2649501c2c.tar.bz2
txr-a2ebdf6228c7bee57ca9470477f09b2649501c2c.zip
matcher: struct: move type test before slot tests.
In the loose form of the @(struct ...) match, the struct type is matched by a pattern. This pattern should execute before the object is tested for the presence of the required slots by by guard1. It should not come between testing for the presence of slots, and then testing their contents. * share/txr/stdlib/match.tl (compile-struct-match): Do not lump together the type-match and slot-matches into a single all-matches list. Emit type-match's guard before guard1, and the slot-matches guards after. The order is basic test (guard0), struct type pattern match (type-match), slots-present (guard1) and then slot contents (slot-matches).
Diffstat (limited to 'protsym.c')
0 files changed, 0 insertions, 0 deletions