1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
;; Copyright (c) 2020-2023 by Greg Hendershott.
;; SPDX-License-Identifier: GPL-3.0-or-later
#lang racket/base
(provide (struct-out lang-info)
lang-info-grouping-position-is-racket?)
;; This is its own file really just so that hash-lang.bridge.rkt can
;; require it normally and not need to do more dynamic-requires.
(struct lang-info
(module-language
lexer
paren-matches
quote-matches
grouping-position
line-indenter
range-indenter
submit-predicate
comment-delimiters)
#:transparent #:authentic)
(define racket-grouping-position
(with-handlers ([exn:fail? (λ _ #f)])
(dynamic-require 'syntax-color/racket-navigation 'racket-grouping-position)))
(define (lang-info-grouping-position-is-racket? li)
(equal? (lang-info-grouping-position li) racket-grouping-position))
|