Skip to content
MAKONEA
πΊπΈ
US
English
Turn filter on
Home
About
Writing
Projects
Memo
Wiki
Trends
Guestbook
β¦
β Revision history
Compare revisions
Visitor Pattern
Body changes between the two selected stored revisions. Code is not executed.
Before: full revision: 2026-10-25 00:29:30 UTC
After: full revision: 2026-10-25 01:38:51 UTC
Changes
Side by side
JSON and code changes
1 changed sections
β Removed
+ Added
23 unchanged content blocks omitted.
Content blocks 16 β 16
β
node.Accept()
dispatches
to
the
concrete
element;
its
Visit(
this
)
then
selects
the
visitor
operation
for
that
element
type.
That
is
why
text
and
image
nodes
produce
different
output
.
+
The
caller
holds
node
as
IDocNode,
so
Visit(
node
)
cannot
select
either
the
TextNode
or
ImageNode
overload.
Each
concrete
Accept()
passes
its
own
typed
this
to
Visit(),
selecting
the matching operation without type checks in the caller
.
Show code and formatting changes