8.18
top
← prev up next →

Source SyntaxπŸ”— i

procedure

( recover-source-syntax orig
expanded
[ #:traverse-now?now?])
(-> syntax? (or/c syntax? #f))
orig:syntax?
expanded:syntax?
now?:boolean? =#f
Returns a procedure that accepts a syntax object from expanded and returns the outermost syntax object in orig that has the same location as the given syntax object. If no syntax object in orig has the same location as the given syntax object, the procedure repeats with the parent of the given syntax object.

Example:
> (let* ([orig#'(λ (x[y0])(+ xy))]
[expanded(expand orig)]
[recovered((recover-source-syntaxorigexpanded)expanded)])
(syntax? recovered))

#t

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /