some things
This commit is contained in:
parent
53668f770e
commit
9e8135ee05
1
beautiful-racket/br/demo/jsonic/drracket-indenter.rkt
Normal file
1
beautiful-racket/br/demo/jsonic/drracket-indenter.rkt
Normal file
|
@ -0,0 +1 @@
|
|||
#lang racket/base
|
14
beautiful-racket/br/demo/jsonic/drracket-lexer.rkt
Normal file
14
beautiful-racket/br/demo/jsonic/drracket-lexer.rkt
Normal file
|
@ -0,0 +1,14 @@
|
|||
#lang racket/base
|
||||
|
||||
(require parser-tools/lex
|
||||
(prefix-in : parser-tools/lex-sre))
|
||||
|
||||
(provide default-lexer)
|
||||
|
||||
|
||||
(define default-lexer
|
||||
(lexer
|
||||
[(eof) (values lexeme 'eof #f #f #f)]
|
||||
[(:seq "//" (:* (char-complement "\n")))
|
||||
(values lexeme 'comment #f (position-offset start-pos) (position-offset end-pos))]
|
||||
[any-char (values lexeme 'no-color #f (position-offset start-pos) (position-offset end-pos))]))
|
|
@ -28,7 +28,7 @@
|
|||
(λ (key default)
|
||||
(case key
|
||||
[(color-lexer)
|
||||
(dynamic-require 'syntax-color/default-lexer 'default-lexer (λ () #f))]
|
||||
(dynamic-require 'br/demo/jsonic/drracket-lexer 'default-lexer (λ () #f))]
|
||||
[(drracket:indentation)
|
||||
(dynamic-require 'scribble/private/indentation 'determine-spaces)]
|
||||
[else default])))
|
||||
|
|
Loading…
Reference in New Issue
Block a user