You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our map-node and namespaced-map-node model the structure of the source code.
This is convenient when navigating through nodes as one would through source.
But... when we want to logically treat any map as a map the difference is a bit awkward.
I was thinking a protocol for map nodes, but this would only be useful for the non-zipper (direct node) user:
(get-map-children n)
(replace-map-children n)?
So... not sure what might help.
In a previous experiment, I modeled all maps the same, but this made dealing the space that can occur after the namespaced map prefix inconsistent with the rest of the whitespace treatment in rewrite-clj.
The text was updated successfully, but these errors were encountered:
To remain compatible with rewrite-clj v0, we'll need to keep node layout the same.
Anything that we might invent to help treat all maps as maps can be added later.
So I can move this issue to a lower priority for now.
So rewrite-clj would provide finer-grained type information via a new tag+ (see #114) but also define a queryable hierarchy for that new type info via Clojure's isa?.
Why do the keywords that are returned by tag+ need to be qualified with :rewrite-clj? Because we'd be registering their relationship via Clojure's derive whose registry is global and therefore we need the qualifier.
An alternative might be to use Clojure's make-hierarchy to create a rewrite-clj specific hierarchy, but then usage might be more awkward.
Moved from TODO note in docs in user guide.
Our map-node and namespaced-map-node model the structure of the source code.
This is convenient when navigating through nodes as one would through source.
But... when we want to logically treat any map as a map the difference is a bit awkward.
I was thinking a protocol for map nodes, but this would only be useful for the non-zipper (direct node) user:
(get-map-children n)
(replace-map-children n)
?So... not sure what might help.
In a previous experiment, I modeled all maps the same, but this made dealing the space that can occur after the namespaced map prefix inconsistent with the rest of the whitespace treatment in rewrite-clj.
The text was updated successfully, but these errors were encountered: