From c38435a0ee36dd16e74141d9354a2682acfa95ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Tue, 25 Apr 2017 21:01:10 +0200 Subject: [PATCH] Fixed the order of the two extra return values for get-token: the 'new mode' and 'backup distance' were swapped. --- gui-doc/scribblings/framework/color.scrbl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gui-doc/scribblings/framework/color.scrbl b/gui-doc/scribblings/framework/color.scrbl index 16ba2377..9030f7b9 100644 --- a/gui-doc/scribblings/framework/color.scrbl +++ b/gui-doc/scribblings/framework/color.scrbl @@ -64,7 +64,12 @@ The offset given to @racket[get-token] can be added to the position of the input port to obtain absolute coordinates within a text stream. The extra two results are - @itemize[@item{a new mode; + @itemize[@item{a backup distance; + The backup distance returned by @racket[get-token] indicates the + maximum number of characters to back up (counting from the start of the + token) and for re-parsing after a change to the editor within the token's + region.} + @item{a new mode; The mode argument allows @racket[get-token] to communicate information from earlier parsing to later. When @racket[get-token] is called for the beginning on a stream, the mode argument is @racket[#f]; @@ -84,12 +89,7 @@ The mode should not be a mutable value; if part of the stream is re-tokenized, the mode saved from the immediately preceding token is given again to the @racket[get-token] - function.} - @item{a backup distance; - The backup distance returned by @racket[get-token] indicates the - maximum number of characters to back up (counting from the start of the - token) and for re-parsing after a change to the editor within the token's - region.}] + function.}] The @racket[get-token] function must obey the following invariants: @itemize[