@foo@bar' will now parse as a
foo@bar' identifier. This used to be
the case in Scheme mode but not in text mode, and this commit makes the text mode behave as the Scheme mode. (Seems like a convenience point that is not useful since people won't remember the difference.) svn: r15622
This commit is contained in:
parent
2e8de6467a
commit
d0f8970add
|
@ -540,12 +540,11 @@
|
||||||
(define at-rt
|
(define at-rt
|
||||||
(make-readtable readtable command-char 'non-terminating-macro dispatcher))
|
(make-readtable readtable command-char 'non-terminating-macro dispatcher))
|
||||||
(define cmd-rt
|
(define cmd-rt
|
||||||
;; similar to plain Scheme (scribble, actually), but with `@' and `|' as
|
;; similar to plain Scheme (scribble, actually), but with `@' as usual and
|
||||||
;; terminating macro characters (otherwise it behaves the same; the only
|
;; and `|' as a terminating macro characters (otherwise it behaves the
|
||||||
;; difference is that `a|b|c' is three symbols and `@foo@bar' are two
|
;; same; the only difference is that `a|b|c' is three symbols)
|
||||||
;; @-forms)
|
|
||||||
(make-readtable readtable
|
(make-readtable readtable
|
||||||
command-char 'terminating-macro dispatcher
|
command-char 'non-terminating-macro dispatcher
|
||||||
#\| 'terminating-macro
|
#\| 'terminating-macro
|
||||||
(lambda (char inp source-name line-num col-num position)
|
(lambda (char inp source-name line-num col-num position)
|
||||||
(let ([m (*regexp-match #rx#"^([^|]*)\\|" inp)])
|
(let ([m (*regexp-match #rx#"^([^|]*)\\|" inp)])
|
||||||
|
|
|
@ -283,7 +283,7 @@ separate text arguments in the S-expression part of an @"@"-form.
|
||||||
|
|
||||||
@example|-{#lang scribble/text
|
@example|-{#lang scribble/text
|
||||||
@(define (choose 1st 2nd)
|
@(define (choose 1st 2nd)
|
||||||
@list{Either @1st, or @2nd@"."})
|
@list{Either @1st, or @|2nd|@"."})
|
||||||
@(define who "us")
|
@(define who "us")
|
||||||
@choose[@list{you're with @who}
|
@choose[@list{you're with @who}
|
||||||
@list{against @who}]
|
@list{against @who}]
|
||||||
|
@ -297,7 +297,7 @@ sub-parts without dealing with quotes.
|
||||||
|
|
||||||
@example|-{#lang scribble/text
|
@example|-{#lang scribble/text
|
||||||
@(define (choose 1st 2nd)
|
@(define (choose 1st 2nd)
|
||||||
@list{Either @1st, or @2nd@"."})
|
@list{Either @1st, or @|2nd|@"."})
|
||||||
@(define who "us")
|
@(define who "us")
|
||||||
@choose[@list{you're with @who}
|
@choose[@list{you're with @who}
|
||||||
@list{against @who}]
|
@list{against @who}]
|
||||||
|
@ -324,9 +324,9 @@ convenient --- you can even specify the patterns with @"@"-forms.
|
||||||
@(require scheme/match)
|
@(require scheme/match)
|
||||||
@(define (features . text)
|
@(define (features . text)
|
||||||
(match text
|
(match text
|
||||||
[@list{@1st@...
|
[@list{@|1st|@...
|
||||||
---
|
---
|
||||||
@2nd@...}
|
@|2nd|@...}
|
||||||
@list{>> Pros <<
|
@list{>> Pros <<
|
||||||
@1st;
|
@1st;
|
||||||
>> Cons <<
|
>> Cons <<
|
||||||
|
@ -369,7 +369,7 @@ number of body expressions must be fixed.
|
||||||
|
|
||||||
@example|-{#lang scribble/text
|
@example|-{#lang scribble/text
|
||||||
@(define ((choose . 1st) . 2nd)
|
@(define ((choose . 1st) . 2nd)
|
||||||
@list{Either you're @1st, or @2nd@"."})
|
@list{Either you're @1st, or @|2nd|.})
|
||||||
@(define who "me")
|
@(define who "me")
|
||||||
@@choose{with @who}{against @who}
|
@@choose{with @who}{against @who}
|
||||||
---***---
|
---***---
|
||||||
|
|
|
@ -31,13 +31,13 @@ fo@o -@-> fo@o
|
||||||
---
|
---
|
||||||
|@foo| -@-> @foo
|
|@foo| -@-> @foo
|
||||||
---
|
---
|
||||||
@foo@bar -@-> foo bar
|
@foo@bar -@-> foo@bar
|
||||||
---
|
---
|
||||||
@foo@bar. -@-> foo bar.
|
@foo@bar. -@-> foo@bar.
|
||||||
---
|
---
|
||||||
@foo@bar: -@-> foo bar:
|
@foo@bar: -@-> foo@bar:
|
||||||
---
|
---
|
||||||
@foo@bar; -@-> foo bar
|
@foo@bar; -@-> foo@bar
|
||||||
---
|
---
|
||||||
@foo[]@bar{} -@-> (foo) (bar)
|
@foo[]@bar{} -@-> (foo) (bar)
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in New Issue
Block a user