From cedb9553137045409f3484b031f0d18cd7667839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 19 Sep 2016 20:38:01 +0200 Subject: [PATCH] Tried to document with scribble/example, but it turns out the order is not reliable for ~global --- .../extensible-parser-specifications.scrbl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scribblings/extensible-parser-specifications.scrbl b/scribblings/extensible-parser-specifications.scrbl index 81279aa..c203671 100644 --- a/scribblings/extensible-parser-specifications.scrbl +++ b/scribblings/extensible-parser-specifications.scrbl @@ -1,10 +1,16 @@ #lang scribble/manual -@require[@for-label[phc-toolkit/untyped +@require[scribble/example + @for-label[phc-toolkit/untyped extensible-parser-specifications generic-syntax-expanders racket/base + syntax/parse (only-in racket/base [... …])]] +@(define make-evaluator + (make-eval-factory '(syntax/parse + extensible-parser-specifications))) + @title{extensible-parser-specifications} @author{@author+email["Georges Dupéron" "georges.duperon@gmail.com"]} @@ -286,9 +292,10 @@ the notion of order irrelevant. value within any @racket[valueᵢ] group is @racket[#f], then the @racket[_attribute-name] is bound to @racket[#f]. - For example, the following code produces @racket[6]: - - @racketblock[ + @examples[ + #:eval (make-evaluator) + #:once + #:label "For example, the following code produces 6:" (syntax-parse #'(1 ya (2 3) 4 yb (5 6) yc 7) [(~no-order {~and x:id {~global-and [g (syntax-e #'x)]}} {~global-and [g (syntax-e #'y)] y:number}