Handbook
Glossary
skip-blank ( lexer -- )
The lexer
Prev:
next-line ( lexer -- )
Next:
skip-word ( lexer -- )
Vocabulary
lexer
Inputs
lexer
a
lexer
Outputs
None
Generic word contract
Skips whitespace characters.
Notes
Custom lexers can implement this generic word.
Definition
IN:
lexer
GENERIC:
skip-blank
( lexer -- )
Methods
USING:
kernel
lexer
lexer.private
sequences
;
M:
lexer
skip-blank
shebang?
[
[
nip
length
]
change-lexer-column
]
[
[
(skip-blank)
]
change-lexer-column
]
if
;
USING:
accessors
generic
kernel
lexer
literate
math
sequences
;
M:
literate-lexer
skip-blank
dup
column>>
zero?
[
dup
line-text>>
[
"> "
head?
[
[
2
+
]
change-column
M\
literate-lexer
skip-blank
(call-next-method)
]
[
[
nip
length
]
change-lexer-column
]
if
]
[
drop
]
if*
]
[
M\
literate-lexer
skip-blank
(call-next-method)
]
if
;