Hi,

Is there any existing option/fn to get the offsets and lengths of parsed 
content ?

For example for this:
> (-> sexpr p/incremental-buffer (p/edit 0 0 "(") (p/edit 1 0 "x)") 
p/parse-tree clojure.pprint/pprint)

...instead of:

{:tag :root,
 :content
 [{:tag :list, :content ["(" {:tag :symbol, :content ["x"]} ")"]}]}

...getting something like this:

{:tag :root,
 :content
 [{:tag :list, :offset 0, :length 3, :content ["(" {:tag :symbol, :offset 
1, :length 1, :content ["x"]} ")"]}]}

?

I guess project "paredit.clj" also does this more or less.. I just don't 
find the simplest fn to do this in its purest form.

Best, 
Joerg

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to