Last active
December 14, 2016 14:46
-
-
Save mflatt/d569d8f3a89e6815cf18df26adc11053 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(module property racket | |
(provide quote-syntax/add-example-property | |
id) | |
(define-for-syntax compile-time (current-inexact-milliseconds)) | |
(define-syntax (quote-syntax/add-example-property stx) | |
(syntax-case stx () | |
[(_ e) (with-syntax ([e+prop (syntax-property | |
#'e | |
'example | |
compile-time | |
#t)]) | |
#'(quote-syntax e+prop))])) | |
(define id (quote-syntax/add-example-property id)) | |
(syntax-property id 'example)) | |
(require 'property) | |
(syntax-property (quote-syntax/add-example-property new-id) 'example) | |
(syntax-property id 'example) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment