added B: (break for parsing words) and appropriate documentation
parent
b3747936b9
commit
6e141b8f6e
|
@ -12,6 +12,9 @@ HELP: breakpoint-if
|
|||
HELP: B
|
||||
{ $description "An alias for " { $link break } ", defined in the " { $vocab-link "syntax" } " vocabulary so that it is always available." } ;
|
||||
|
||||
HELP: B:
|
||||
{ $description "A breakpoint for parsing words. When this word is executed, it copies the definition of the following parsing word, prepends a " { $link break } " to it so that it is the first word to be executed when the definition is called, and calls this new definition.\n\nWhen the walker tool opens, execution will still be inside " { $link POSTPONE: B: } ". To step out of B: and into the parsing word, do just that: jump out with O, then into with I." } ;
|
||||
|
||||
ARTICLE: "breakpoints" "Setting breakpoints"
|
||||
"In addition to invoking the walker explicitly through the UI, it is possible to set breakpoints on words using words in the " { $vocab-link "tools.walker" } " vocabulary."
|
||||
$nl
|
||||
|
@ -24,6 +27,7 @@ $nl
|
|||
{ $subsections
|
||||
break
|
||||
POSTPONE: B
|
||||
POSTPONE: B:
|
||||
}
|
||||
"Note that because the walker calls various core library and UI words while rendering its own user interface, setting a breakpoint on a word such as " { $link append } " or " { $link + } " will hang the UI." ;
|
||||
|
||||
|
|
|
@ -168,3 +168,7 @@ SYMBOL: +stopped+
|
|||
IN: syntax
|
||||
|
||||
SYNTAX: B \ break suffix! ;
|
||||
|
||||
SYNTAX: B: scan-word definition
|
||||
[ break "now press O I to land inside the parsing word" drop ]
|
||||
prepose call( accum -- accum ) ;
|
||||
|
|
Loading…
Reference in New Issue