From 19bfe3e44d3020fd11632252d7bc1cc559a2bb09 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 30 Oct 2016 12:14:13 +0100 Subject: [PATCH] xform: another Apple divergence from normal C tokenization Make xform work with __attribute__ ((availability(macosx, introduced = 10.12.1))) where `10.12.1` is not a normal C token. --- racket/collects/compiler/private/xform.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/racket/collects/compiler/private/xform.rkt b/racket/collects/compiler/private/xform.rkt index 5f0003b5b7..4c268deac2 100644 --- a/racket/collects/compiler/private/xform.rkt +++ b/racket/collects/compiler/private/xform.rkt @@ -234,8 +234,10 @@ (define symbol-complex (trans (seqs L (arbno (alt L D))))) - ;; Accomodate things like 10_1 in `availability` attributes: - (define pseudo-symbol-complex (trans (seqs (arbno D) "_" (arbno D)))) + ;; Accomodate things like 10_1 and 10.12.1 in `availability` attributes: + (define pseudo-symbol-complex (trans (alt* + (seqs (arbno D) "_" (arbno D)) + (seqs (one+ D) "[.]" (one+ D) "[.]" (one+ D))))) (define number-complex (trans (alt*