Handbook
Glossary
(parse-tuple-definition) ( word -- class superclass slots )
Vocabulary
classes
.
tuple
.
parser
Inputs
word
an
object
Outputs
class
an
object
superclass
an
object
slots
an
object
Definition
USING:
combinators
kernel
lexer
make
parser
;
IN:
classes.tuple.parser
:
(parse-tuple-definition)
( word -- class superclass slots )
scan-token
{
{
";"
[
tuple
f
]
}
{
"<"
[
scan-word
[
parse-tuple-slots
]
{
}
make
]
}
[
tuple
swap
[
parse-slot-name
[
parse-tuple-slots
]
when
]
{
}
make
]
}
case
dup
check-duplicate-slots
3dup
check-slot-shadowing
;