some things

This commit is contained in:
Matthew Butterick 2016-09-27 18:17:47 -07:00
parent 53668f770e
commit 9e8135ee05
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1 @@
#lang racket/base

View 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))]))

View File

@ -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])))