add `br/quicklang`

pull/2/head
Matthew Butterick 8 years ago
parent 08dcc922d9
commit e0b5855e3e

@ -0,0 +1,19 @@
#lang racket
(provide (all-defined-out))
(require racket/class)
(define (indenter t pos)
(with-handlers ([exn:fail? (λ(exn) #f)]) ; this function won't work until gui-lib 1.26
(send t compute-racket-amount-to-indent pos (λ(x)
(case x
[("with-pattern" "with-shared-id") 'lambda]
[("define-macro") 'define]
[else #f])))))
(define (br-get-info key default default-filter)
(case key
#;[(color-lexer)
(dynamic-require 'syntax-color/default-lexer 'default-lexer)]
[(drracket:indentation) indenter]
[else
(default-filter key default)]))

@ -24,21 +24,5 @@
(module reader syntax/module-reader (module reader syntax/module-reader
#:language 'br #:language 'br
#:info my-get-info #:info br-get-info
(require br/get-info))
(require racket/class)
(define (indenter t pos)
(with-handlers ([exn:fail? (λ(exn) #f)]) ; this function won't work until gui-lib 1.26
(send t compute-racket-amount-to-indent pos (λ(x)
(case x
[("with-pattern" "with-shared-id") 'lambda]
[("define-macro") 'define]
[else #f])))))
(define (my-get-info key default default-filter)
(case key
#;[(color-lexer)
(dynamic-require 'syntax-color/default-lexer 'default-lexer)]
[(drracket:indentation) indenter]
[else
(default-filter key default)])))

@ -0,0 +1,14 @@
#lang br
(provide (except-out (all-from-out br) #%module-begin)
(rename-out [quicklang-mb #%module-begin]))
(define-syntax-rule (quicklang-mb . lines)
(#%module-begin
(provide #%top #%app #%datum #%top-interaction)
. lines))
(module reader syntax/module-reader
#:language 'br/quicklang
#:info br-get-info
(require br/get-info))
Loading…
Cancel
Save