[racket] Projectional Editors

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jul 8 05:06:06 EDT 2013

The markers are called syntax-properties and you can use the
syntax-property function to attach one to the output of the macro.

This is a link to the docs
for drracket:module-language-tools:add-online-expansion-handler:


That is how the information for the arrows are collected. The precise
grammar of the syntax object is given  here:


but I think you can probably get away with a simpler loop that just walks
over the syntax object like this:

(define (walk-over stx)
  (let loop ([stx stx])
      [(syntax? stx)
       (check-for-property-and-do-something stx)
       (loop (syntax-e stx))]
      [(pair? stx)
       (loop (car stx))
       (loop (cdr stx))]
      [else (void)])))

The check-for-property-and-do-something would collect whatever information
was left in the properties and return it using the
drracket:module-language-tools:add-online-expansion-handler handler.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130708/a3602615/attachment.html>

Posted on the users mailing list.